Though few are likely to have noticed, I have not been very active on the forum over the last couple of months. I started school in September, with accelerated classes in Linux installation and administration, and MySQL administration. The eighteen hours a week of lecture and lab, plus the reading, plumb wore me out. The second section started three weeks ago. The Apache administration class had insufficient enrollment and was canceled. That left only PHP. Thank gawd for that.
In the first three weeks, we have each installed our own Apache, MySQL and PHP from source. Plus, we have set up PEAR libs and installed the Smarty templating engine. Each class begins with a quiz on the previous lecture, and ends with a lab project based on the current lecture, plus we have an assignment related to the current week's studies. We will have finished the text by the end of the fifth week, and will spend the last three weeks on developing a web application. I suspect that it will be either a commerce site or something like a blog.
All that explains my lack of activity here, and brings me to the subject of this post.
Tonight's lecture was about abstracting the database so the PHP doesn't need to know which DB it's using or how it's using it. Likewise, templating removes the html from the code. The html guys can do their magic, presenting the data without screwing with PHP, and the PHP guys don't have to mess with the html.
The client tier has very similar needs. We don't want behavior mixed with our html. A change, let's say you're changing onclick event handlers, would mean editing every page that contains that client side scripting. Take it out of the html, and you don't care. One changed file propagates the new event handler throughout the site.
CSS lets us remove presentational markup from the html. No more font tags, or color attribute, or tables for layout or even inline style attributes. It's all in a separate css file, where a single change is applied site-wide.