I'm interested in compiling the templates server-side, so that they
can be rendered very quickly on the client-side. I noticed this is a
TODO item in the JavaScript implementation. Is there anything else to
consider aside from simply splitting _Compile into a separate module?
What form should the compiled template take?
If possible I would like the client-side part to be as short and fast
as possible. I would even consider going to the extreme and making it
so the compilation step generates something like this to send to the
client:
(function(d){function c(x){callback(c);}c('<html><body>');c(formatter
(d.foo.bar));c('</body></html>');})({foo:{bar:'baz'}});
This would then be very quick to eval on the client-side.
At the moment I imagine it would require minimal changes to simply
send a JSON representation of the compiled template to the client, and
it could then be passed to the renderer.
Any comments on making this super-efficient would be appreciated.
Thanks,
Jason
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JSON
Template" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/json-template?hl=en
-~----------~----~----~----~------~----~------~--~---