[Buildbot-devel] Using DTL instead of HAML

Pierre Tardy tardyp at gmail.com
Mon Nov 26 17:06:41 UTC 2012


On Mon, Nov 26, 2012 at 5:55 AM, Dustin J. Mitchell <dustin at v.igoro.us>wrote:

> I've been working on turning the new Buildbot Dojo application into a
> separate package.  Part of the reason to do so is to make it familiar
> to someone who knows Dojo.
>
> Up to now, the templates for the application have been written in
> Haml, which is a beautiful templating language -- but which requires
> offline compilation and isn't "normal" Dojo.
>
> I'm looking at DTL -
> http://dojotoolkit.org/reference-guide/1.8/dojox/dtl.html - as a
> replacement.  But its documentation is in pre-1.7 style, so it's not
> immediately clear to me how to use it.  And when I fired it up, it
> told me (via console.warn) that it's experimental and that its API may
> change at any time.
>

I have used dojox.dtl in the past, and I've found it very slow. They try to
achieve real compatibility with python's dtl, and thus have to implement a
mini-python interpreter, hence this cannot be made simple.

haml-js is different haml-ruby. They kept the whole idea, but the inline
code is js instead of ruby, so the implementation is ultra simple.
Unfortunatly the code is ECMA 5, so it is not working well with IE8, and it
needs work for having a dojo build plugin. this is why I made hamlcc so
that dojo just sees the compiled js files.


>
> Is there a different, better-supported templating library in Dojo?  Is
> DTL more stable than it suggests?
>

Probably it is a question we have to ask to the dojo experts where you can
find them.adding dojo list :-)

The question can be rephrased in:
Do you guys have a plan on AMD support for templating libraries

I mean all templates engine have the same in common.
- you need an AMD loader plugin
- you need a dojo build plugin

What about making a generic one, that only takes a "compile" function, that
compiles the template into a js function? Thus we can plug easily any
templating library.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20121126/18d4e852/attachment.html>


More information about the devel mailing list