Put the fun back in writing templates
- Your templating engine sucks and everything you have ever written is spaghetti code (yes, you)
- HN thread for the blog post above
Making a pun on the post title: Every programmer is on a long, cyclical journey where every stepping stone feels like a new kind of enlightenment. Blogging allows them to share their brilliance with the world, showing how they are surely amongst the first to attain their new level of purity and zen. -- peteforde on HN
- On templating, and a shameless plug of Moulder
- Pure HTML templates theory, implemented as querytemplates
- scuery
- HTML::Zoom
- weld.js
- enlive
- CAST
- wicket (it is solving non-persistant selectors issue with custom attributes)
- hquery
- effigy
- meld
More examples? It should use nice-to-write DSL with CSS/jQuery like selectors, and be able to "compile" templates to PHP inlining the dynamic code (like querytemplates is doing). There should be no special syntax in HTML, except template inhertiance (master page) if no better option exists.
I like the name "template animation" (name by Iain Dooley) for doing this, even it is very bad for SEO. It sounds more fun than non-obtrusive HTML replacing others are talking about. In fact it is not just replacement, it is generation, conditionals and else. "Mockup-driven development" (name by judofyr on HN) is not bad as well.
Parsing XML documents with CSS selectors looks very useful.
.✎ Post comment No comments, be first!