Skip navigation.

Claws, fangs, fur...

...the bear essentials

July 2008

( Monthly archive )

Updating the OmegaJunior.Net, using KISS

For those interested in the technology behind the new layout engine of the OmegaJunior.Net (which, entirely uncoincidentally, is my personal web site), here's a bit of disclosure.

The layout engine is a single PHP file that accepts an article name as its only parameter. The article name matches a folder name. If no such folder exists, a 404 message will be presented to the browser.

If such a folder does exist, the layout engine looks for a couple of files, named exactly the same in each folder. This is similar to reading fields in a database record... without the database.

For each file that is found, a layout is generated. The title file is echoed into the page title, the description file is echoed into the page description. The body file is parsed using a BBCode parser borrowed from someone else: that allows for a rather basic mark-up, which suffices for most of my needs. The links file is parsed as an ULHTMLElement, containing a list of hyperlinks. The rest is static text in the layout engine.

The layout engine is extremely simple. The data storage is extremely simple. The CSS is extremely simple. Using the BBCode in the article's body is extremely simple. The impact however, is extremely high.

It's quite a bit of work to update the entire site, seeing how many articles I've published thus far. And though it is a lot... it remains easy.

I'm a professional CMS implementor. I've seen a couple of CMS-es and a couple of internet forum and discussion board systems. Of course, those systems sport a user administration, version control, article workflow and moderation, caching mechanisms... but mine is an extremely fast, easy to use layout engine, coupled to an extremely easy to use storage and update system.

KISS (Keep It Simple, Stupid) will be my motto for now.

With KISS, I can ignore the site's layout engine, and concentrate on the contents of the articles, which most of the time is not so simple.
Download Opera, the fastest and most secure browser