If you've done much web development, then you know that things can get really old really quick when you have to cut and paste HTML or Javascript into multiple pages. Things can get a little busy when you start updating those pages and making changes on one page and not another. You start to loose track of things, and you page ends up showing it. There has to be an easier way, right? Well, DevArticles just might have your answer...
In their latest article, Writing Your Own Template Caching Class In PHP, the author demonstrates how to take a sample template page and use a template class to help you generate pages that are easier to maintain and simpler to code. The code for the class that he gives you helps your site as well by working to cache variables and information, speeding up the templates by a bit. And, thankfully, at the end, he provides the entire code so that you don't have to cut and paste all of the other info.
And, of course, what would a good article be without some examples to show you how to really use the class. It's a nice idea, but might be a little too complicated for some people who are still a little green to PHP.




