The templating system is interesting. It does something I have not seen before: You can define one template, then execute it server-side (in Java only) and/or client-side (compiled into Javascript).
To achieve this, the template language is quite restricted. It seems that we could write interpreters for this language in Ruby, Python, etc.
Also, we could write a compiler back-end which generates C to run inside nginx or Apache; this could yield a high-performance templating system.
Here's an example template I made. Note that the "javadoc" portion is mandatory and is parsed by the compiler.
/**
* show a table
*
* @param data array of values
* @param ncols num columns
*/
{template .vvtable}
<table cellspacing=10><tr>
{foreach $d in $data}
<td><div style="background-color:#f00;padding:5px">{$d}</div></td>
{if not isFirst($d) and index($d) % $ncols == 0}
</tr><tr>
{/if}
{/foreach}
</tr></table>
{/template}
The templating system is interesting. It does something I have not seen before: You can define one template, then execute it server-side (in Java only) and/or client-side (compiled into Javascript).
To achieve this, the template language is quite restricted. It seems that we could write interpreters for this language in Ruby, Python, etc.
Also, we could write a compiler back-end which generates C to run inside nginx or Apache; this could yield a high-performance templating system.
Here's an example template I made. Note that the "javadoc" portion is mandatory and is parsed by the compiler.