How this site was constructed (Mark II)
There have been a few changes to this site behind the scenes. In the past it was a collection of flat html files and the associated CSS and image files. While this made it easy to work with in many respects it has now grown too big to be able to make global changes easily. Just adding the creative commons licence link to every page would have taken about an hours work with plain old html.
As I have been working with PHP for a couple of years now I thought that I should add PHP to my own site as well. I was looking for an excuse to do that and this seems ideal.
This site now is in effect an interface to a MySQL database with PHP as the middleware. I have followed the 3 tier architecture fairly closely in order to separate the presentation from the logic of the site. This also allows me to do things such as switch presentation elements and redesign the look and feel of the site without changing the rest of the code.
The main elements of the construction of the site are as follows.
- MySQL
- This stores the content of the site.
- PHP
- This handles the work of querying the database to decide which content is to be served to the user.
- Smarty templates
- These handle the presentation layer. They take the content that PHP has extracted from the database and convert it to html.
Each of these will now be considered in turn.
