4 ms·
There are a growing faction of people (of which I'm not quite part of yet, but I'm starting to warm up to it) that says that developers should be emitting HTML
by icey 17y ago
There are a growing faction of people (of which I'm not quite part of yet, but I'm starting to warm up to it) that says that developers should be emitting HTML and passing it off to designers who will style it using nothing but CSS (and asking the developers to modify the HTML where needed).
There is definitely something attractive about transforming HTML as code, but yeah, I really wouldn't want to hand a designer a chunk of lisp to work with.
- jimbokun 17y agoTranslating a chunk of Lisp into a chunk of HTML for a designer to work with, then translating it back, should be a straight forward problem to solve, no?
- jules 17y agoNo, because the Lisp template language isn't just another syntax for HTML: it contains control structures and other constructs not supported by HTML.
- ajuc 17y agoLike any templating engine I've seen - there are "for each", "if then else" etc. It's just matter of convention - designer should know what he can change, and what he cannot - lisp-encoded html is almost like normal html, and has the adventage of being compiled - some static checking can be done. When you extract data producing into functions only called b name in code that is emiting html it will lokk just like html template, and it has all the clojure power when it's needed.