Links | About this website

The code behind this website was programmed in 2004, based on the eXtensible HyperText Markup Language (XHTML1.1) reference specification, in combination with Cascading Style Sheets (CSS3). The website was constructed bottom-up, because the at the time existing content management systems (CMS) and template engines were insufficient for the construction of this website.

I therefore created my own template engine that allowed me to build new webpages without much effort. Most of these engines are aimed at separating business logic from presentation logic (e.g., the popular Smarty system). However, for my own purposes, I needed a templating system that operated on a higher level (without turning into a full-fledged CMS), which required functionality that typical template engines do not offer.

I programmed the entire template system in PHP5 with the underlying server-side model operating as follows:

  1. A specific page is requested through the website's main entry point, i.e., index.php, by means of a key (i.e., the part behind the ?page= specification in the webpage's URL).
  2. The requested key is looked up in a database, and if it exists and a reference to its corresponding page is found, then the contents are fetched from the website's specific subdirectory.
  3. A script called the PageGenerator is executed. This script dynamically constructs a custom webpage, by including different structural elements (i.e., header, footer, menu bar, content window). The previously fetched contents are parsed, and added to the webpage.

As stated before, all webpages are requested and constructed through the website's main entry point, index.php. Because this file is located in the website's root directory, all local references within the custom content pages (e.g. a and img tags) need to be absolutely defined. In order to circumvent this problem, the PageGenerator alleviates this need by correctly translating and substituting all local relative paths.

The contents in step (2) actually consist of a mix between PHP and XHTML code; it is here that most template engines operate, i.e., separating the functionality (the PHP part) from the layout design (the XHTML part). For the construction of this website, it was not a necessity, as all layout is handled by the CSS design, and the functionality of the current template engine superseeds that of the classic solutions. Finally, the website contents were checked for W3C XHTML 1.1 and CSS validity.


The following graphs summarise some website statistics from April 2007 until December 2015: