aquametalabs/aquameta

endpoint: redesign templates and template routes

erichanson opened this issue · 0 comments

Support for dynamic templates (endpoint.template and endpoint.template_route) was dropped when we dropped dependence on plv8 and plpython. They need to be resurrected. So might as well revisit the architecture also.

I took a shot at doing server-side rendering of doT templates here using plgo as a procedural language and otto to as a Javascript engine. The main argument for using doT templates (or any other template language that has a Javascript syntax) is that they could then also be rendered client-side, and they use the same language as widgets do (so you don't have to learn two things). That said, it's a really half-assed templating language and there is probably a whole swath of functionality that could be included here.

How should templates work?