2 ms·
Sweet, sweet irony. It's not every day that you see a post titled "You're Doing It Wrong" that's, well, doing it wrong. I've worked on plenty of sites of varyi
by swombat 18y ago
Sweet, sweet irony. It's not every day that you see a post titled "You're Doing It Wrong" that's, well, doing it wrong.
I've worked on plenty of sites of varying complexity. If your templates have anything more than trivial logic in them, You're Doing It Wrong!
Adding complex programming constructs back into the templating language is NOT the way forward. It's the way BACKWARDS. It's where we came from. Templating languages are intentionally simple because you're NOT supposed to have lots of complex logic in your template. Sure, you might have a little bit of if/then/else and a bit of looping, but beyond that, if you need anything more than that, you're doing it Very Wrong.
As for ending up with huge templates - again, Jeff is Doing It Wrong. To avoid having monster spaghetti templates, you're supposed to break down your templates into their elements, much like you break down your large pieces of functionality into classes and methods.
- alexk 18y agoMy app evolved in the following way: templates with logic/inline JS -> templates without logic/ external js -> almost no templates/ JS + Ajax to draw the page on the fly