3 ms·
My view is probably warped because I helped design the PTL "language" for Python. However, it's been my experience if you write well factored code (i.e. Don't-
by nas 15y ago
My view is probably warped because I helped design the PTL "language" for Python. However, it's been my experience if you write well factored code (i.e. Don't-Repeat-Yourself, helper functions/macros), then templates that use the HTML by default mode end up looking extremely ugly. Essentially you end up with mostly Python logic with a little HTML markup mixed in.
It's not friendly to UI designers who like to load it into something like Dreamweaver or translate their static design into the template. I haven't thought of any good solution for that though. Zope TAL seemed like a valiant attempt but I'm sure how successful it was.
- dodothelast 15y agoi solved that by problem in my library https://github.com/dodo/node-dynamictemplate https://github.com/dodo/node-dynamictemplate with the ui designers by masking their static html on my functions, which are only a subset of the part in the static html which you want to cover. this way using a html mockup from a designer is like using an 3D from a 3D model artist, because you only load the data in, selecting what you want and putting a animatinon mesh / functionality into it. tldr-part: look at my wip code → https://github.com/dodo/node-dynamictemplate/blob/a46fb6ed18847af7309f66f4cf66abd08517736b/src/compile.coffee#L285-L307 https://github.com/dodo/node-dynamictemplate/blob/a46fb6ed18...
- trip42 15y agoTAL is one of the most impressive things to come out of Zope, after using it for years I feel dirty using a templating system allows inline programming logic. Chameleon templates implement Zope's TAL for use outside of Zope: http://chameleon.repoze.org/ http://chameleon.repoze.org/