For small, personal projects or projects for which you are the 'display designer', the notion of using a template system seems like overkill. However if you ever get to the point of working on a larger project and having a dedicated 'display designer', you'll end up singing the praises of a template system.
What if your development team consisted of 2 coders and 1 UI person? You might be decent at UI, the other coder isn't, and your UI guy really isn't that good at perl. Each of you needs to be able to exercise your strengths and not be hindered by your weaknesses.
- What happens when the UI person needs to make a decent sized structural change to the HTML? There's a pretty big risk that he's going to break the program.
- How many times is the UI guy going to be editing the same script (for UI changes) at the same time that you need to edit it for code changes?
- Have you ever had to alter the flow of your logic to accomidate what the layout of the HTML has to be?
- Can you imagine the horror if this UI guy wants to try and use something like DreamWeaver to edit the HTML? *shudder*
- What if you're building an turn key type of website and the buyers all want a different UI?
Ask yourself each of these questions with "If I have a templated system the answer is:" and "If I do not then it's:".
Here's a real world scenerio. A site that I, another coder, and a UI guy developed uses HTML::Template and just underwent a complete UI change, along with adding features. The total number of pages is nearly 300. How many of the existing perl modules do you think had to be changed to accomidate any UI changes the designer made? In our case, none of them.
perl -l -e "eval pack('h*','072796e6470272f2c5f2c5166756279636b672');"