<$BlogRSDUrl$>

Internal Server Error

what the voices in my head tell me to write

Monday, April 12, 2004

New updates to the htmler.org site

There are a few new things on the site I am quite proud of. (in a slightly shameful geeky way).

The site is now database driven using a very basic bit of code I cooked up myself. At the moment the only parts of it that are written are the bits for displaying the actual content of the site. The only way for me to add content right now is with an SQL dump! Phase two of the development will be addressing this. Eventually there will be a Content Management System of sorts on there.

I decided to write my own system instead of just installing post-nuke or something similar for several reasons.

  • To learn how to write CMS systems. They seem increasingly important so I thought I had better get in on the act.
  • To learn more about object orientated PHP.
  • To use Smarty templates for the first time
  • When I think on it. This is the first fully database back-end driven site I have ever actually produced. All the sites I did for Pulse used html and only had very limited dynamic content.

When I actually sat down to write the code it wasn't too bad at all. However the "getting things out of the database" side of things is often more difficult than the "getting things into the database". Especially the "valid things" part of it. Most of the code at the moment lies in 5 files.

  • The Smarty class which I don't have to worry about,
  • The Smarty templates, which are relatively easy to produce,
  • The class to connect to the database and run queries,
  • The class to generate the content on the page,
  • The index.php file to link it all together.

To make it slightly more obvious that things have changed I added in what started out to be a style-sheet switcher for the design. Then it sort of grew a little to turn it into a template switcher as well. The alternative design only works with Mozilla based browsers but it is still the favourite design I have ever come up with so I don't really care! I haven't integrated this blog in with the rest of the site yet. So you will have to click on the front page link over there <----

I will be writing a tutorial in the near future about my experiences with the system so far. Watch this space!

Permanent link and Comments posted by Rob Cornelius @ Monday, April 12, 2004

Comments: Post a Comment


    follow me on Twitter

    My recent photos

    Archives

    Creative Commons License
    This work is licensed under a Creative Commons License.

    RSS feeds and things

    Feed Button Help

    This page is powered by Blogger. Isn't yours?

    contact the author

    rob cornelius can be contacted by email use his name with an dot and googles web based email domain