Scaling up / scaling down (or should I write that CSS templating thing or just learn Lisp)
2007-12-18 / 22:32 / dave
Part of the ongoing Django vs. Rails debate revolves around the templating language (link needed). The Django templates are intentionally limited. The developers claim this is a feature: it forces your templates to delegate the logic to your domain layer, simplifying your template language and making them easier for your poor beleagured designers to learn.
“Sure,” I says to myself “but not having to learn ANY new language would be better.” Since designers already design their content for CSS styling, why not search the HTML for ID’s and perform substitutions in code? The input would be plain HTML, so the designers–and tools for that matter–could understand it.
Great!
Er, well, assuming you actually have designers to worry about.
Scaling down
I was reading through A Common Lisp web startup test-case, two years after the Reddit switch and saw this:
The entire codebase of stix.to is written in Common Lisp. That is to say, html output is written in s-expressions and all our Javascript is written in Parenscript (if we choose to ignore a few quick hacks).
This seems to be the standard Lisp “write everything in sexps and compile it!” approach. Or as Paul Graham responded to a question about spacer .gifs: “…we’re smart enough to realize that html is object code”
So if you’ve got a small team, why worry about the designer at all? Let the coders use the language they know best… you know the one they use for programming. If the tools are good, the teams can be small; if it’s a 100 year language maybe your team can then shrink to the smallest possible size: one.
So you’re learning lisp?
Not yet. Scaling down to a small tight team sounds good, but really it’s just me dicking around with my web page. I already know HTML and Python; the most Lisp I’ve written is in my ~/.xemacs directory. Still, the more I hear about higher-higher-level languages (Haskell and Lisp, specifically) the more I start to think that I might be working in blub. More correctly, a collection of several blubs.
Anyway, I still think using HTML itself as a templating language makes a lot of sense. I’ll probably eventually get around to trying to write my dinky CSS templating engine beacause it’s a good kata and I think the idea is pretty cool. So if you are working with an army of designers… well, watch this space!

[...] people to give you money), however, a fortune might let you amass a big enough army that you can reach that asymptote. Some people seem to be using the strategy, though it’s questionable how well that’s [...]