2 ms·
I've seen a large scale Mako codebase and the amount of business logic that had sneaked into the templates was horrifying - really made me double-down on my pre
by simonw 5y ago
I've seen a large scale Mako codebase and the amount of business logic that had sneaked into the templates was horrifying - really made me double-down on my preference for limited template languages that help people avoid that temptation.
I helped design Django's template language and I now think we took keeping it restrictive a bit too far though - these days I prefer working with Jinja because it has better support for complex expressions and lets you call functions within your templates. That does mean it requires a bit more discipline to use responsibly though, but being able to control which functions are exposed to the template context helps a lot there.