Making My CMS – Part 1

November 17, 2010   |   Reading time: ~3 mins

Hey all,

Long story short I’ve been doing an awful lot of college work of late and I haven’t had a chance to update. Here’s my opportunity! I am writing a system for fun, so I figured I’d update this blog and vent my geekiness onto the internet. Let’s begin!

My Plan

My Plan for the project is to build somewhat of  a Modular Content Management System (or CMS) in PHP. I’ve already made a first iteration of it and it works, but I want to make it better. I’ve been reading through source code of some of the most popular PHP packages online and I think I’ve picked up some techniques that could help. I also think  that it’d be cool to try and work in some OO Design Patterns. My objectives at the moment are trying to get the core framework written. The main objective is to write a data abstraction layer, using the adapter pattern to adapt to various database softwares and write the core application and user authentication class.

So Far…

Last night I started writing the application class, the class responsible for running the whole site. I also tried to attempt writing the data abstraction layer. I tried using an abstract class for database abstraction that will be extended by the adapter for the particular database the server is running. I hope to write a MySQL adapter, after that I really have no experience with any others, learning will have to be done. I think I will also write an adapter factory that will provide an instance of the adapter to the database manager. I also want to write a Query helper that will write queries for the user instead of having to write a query for each adapter, but as always I will have to see how it all goes.

The complete-ish class I have is a debugging class, it’s taken from the old system and altered a little to make it’s reporting a little more complete. Also, if something throws a fatal error, it kills the entire system so nothing else can be done to completely mess it up… so, unless something is really wrong, don’t throw a fatal error. 😛

What’s Next?

Well, I’m trying to use little inspiration from Apple’s Cocoa Framework and Sub-Class everything that isn’t a low level data provider / other important service off of a central Base abstract class that will build in basic functionality. My old system had a basic plugin architecture that used an abstract class to register plugins with the plugin handler class, however I anticipate that this will be far more complete. I really don’t know if it will work out but it’s an ambition none-the-less. 🙂

Well, Geekiness over for now. I hope this made sense to someone, somewhere. I will try and dump my ideas / thoughts on to here every now and then just for fun.

Thanks for making it this far. Sam.


You Might Also Like...

Leave a Reply

Your email address will not be published. Required fields are marked *


Sorry, there are currently no comments for this artcle. Why not start a conversation?