by codewright · 14y ago · 0 comments
I don't want my HTML templates in my Common Lisp code!
Most of my projects have a separate frontend guy who needs to be able to write the templates himself without touching or knowing the backend code. Django, Rails, Flask, Sinatra et al understand and respect this.
For some reason, most Clojure and Common Lisp libraries fail to grok this. I don't know why.
I want plain HTML files with some simple (mustache or Django/Jinja-style) tokens for injecting data provided by a hash-map/dictionary/assoc-list.
That's. It.
The way I separate it out (and keep it sane!) is by trying to stick to a fairly strict MVC style and keep the backend code in separate functions away from the frontend cl-who templates. But this does still require some initial work in translating the initial html templates to my lisp templates, so I'll agree with you there.
And yes, it certainly does make it more difficult when dealing with 3rd party designers. I have to translate all their basic html templates into lisp/cl-who syntax. But I don't find that too much of a hardship tbh and the tradeoffs are worth it.
That would not work for more complicated projects at all.