4 ms·
To be honest, I have never seen the appeal of logic-less templates to begin with. I can understand wanting a sandboxable template engine independent of language
by LeafStorm 15y ago
To be honest, I have never seen the appeal of logic-less templates to begin with. I can understand wanting a sandboxable template engine independent of language, but that doesn't necessarily translate to "lack of logic."
And yeah, it's easier to shoot yourself in the foot with templates that have logic, but on the other hand with logic-less templates you may need to do something that the template language won't let you do, and then you have to go and write some more code in your domain logic. Which means that you're doing something even worse than pushing your business logic into your display logic - you're pushing your display logic into your business logic!
- rhdoenges 15y agoI think mustache is at its core a reaction to ERB, which allows for pretty baroque logic in templates. Mustache goes all the way in the other direction (which is really not any better).
- spooneybarger 15y agoYou don't push display logic into business logic, you have an adapter for domain objects to become display objects.