For my current project I have now to decide wether I go with the current design or use a template engine. I search the web and it seems that there are many pro's and con's about it.
From what I gathered pro's can be:
- code are different different from design elements
- easier for biger projects
- caching of static pages
con's could be:
- longer execution time
- complex template structuring
- security issues due to possible search engine attacks
Now my current design basically includes the design elements but I use the code on the same script than the content. No problem as I am developping on my own. For most codeing I use OOP so there is not much code on the content pages.
So how much sense makes it for me to use something like smarty basically just for caching? How much overhead would the template engine build?
Template or not to template that is the question
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
oh.. that.. template engines aren't alone in this "problem"
all users of any software that do not update often enough, or quickly enough have this issue.. If you write your own, you may have an issue similar to massively distributed ones, but the damage potential is, likely, far less.. (for other sites anyways)
That mostly has to do with your security programming..
all users of any software that do not update often enough, or quickly enough have this issue.. If you write your own, you may have an issue similar to massively distributed ones, but the damage potential is, likely, far less.. (for other sites anyways)
That mostly has to do with your security programming..
- Buddha443556
- Forum Regular
- Posts: 873
- Joined: Fri Mar 19, 2004 1:51 pm
Re: Template or not to template that is the question
Does not sound like you need a template engine but just caching? Do you need caching?AGISB wrote:So how much sense makes it for me to use something like smarty basically just for caching?
There's nothing wrong with using includes.