Template or not to template that is the question
Posted: Thu Mar 03, 2005 10:22 am
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?
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?