[Nitro] Questions to help me evaluate Nitro
Arne Brasseur
arne at arnebrasseur.net
Mon Sep 3 05:53:54 EDT 2007
Ashley Moran schreef:
> Finally, is there any really cool stuff about Nitro will make me say
> "I wish Rails could do that/did it that way"? I'm much more
> impressed by elegant solutions to problems than I am put off by
> things not working out of the box.
>
One of the things that impressed me was the Nitro 'compiler pipeline'.
Basically a page in Nitro is rendered in two steps, in the first
'compilation' step the template is converted into code which is then
evaluated every time the template is rendered. This compilation happens
through a configurable pipeline of transformation steps. The
transformations could be XML based or just working on the plain text.
One of the IMHO coolest available out of the box is the 'Morpher', e.g.
<div if="@user.is_admin?"> ... </div>
<li for="item in @list">#{item}</li>
The nice thing is that everything that can be done at compilation is a
one time overhead, so afterwards pages render ultra-fast.
You could for instance turn the CSSDryer plugin from Rails into a
compiler step, so you can write 'nested' CSS like this:
#content {
p {
a {...}
a:hover {}
...
}
}
#sidebar {
a {...}
}
(ab)
--
Arne Brasseur
http://www.arnebrasseur.net
arne at arnebrasseur.net
More information about the Nitro-general
mailing list