|
This is definatly not an easy undertaking. It involves puting a lot of theory to practice and I have thought about this on several occasions.
You first want to define the goals of your CMS, will it be a general purpose/community centric CMS or one designed for a tight niche?
Next you want to plan your CMS using something like a flow chart planning out the dissemination(sp?) of information through each layer.
The basic layers you will need will generaly be as follows...
The Core/Kernel: This layer will facilitate all communication between the layers. A good thing to look into when planning your core would be design patterns, in particular the factory pattern.
The Database: You will want this to be a persistent object (again read up on design patterns). You will want this layer to return data in a standard format that all your layers will be able to decipher (perhaps an array in a predictable format).
Templates: Think through your template engine very well, this is the area where most people unfortunatly get it very very wrong. A complete abstraction of business logic (no this does not mean all programming logic) and design logic is not a bad thing as some think. If you plan on distributing your CMS consider using a widely known and familiar template engine like Smarty. The overhead is worth it, trust me.
The Modules: This is the area that gives me the most trouble as trying to figure out the best way to handle hooks and psuedo events is rather difficult for my mind to process. Basically you want to create a generic object that will take a wide array of data through a very narrow (or several narrow), predictable interface. This way others can write applications to interface with your CMS in a structured and predictable manner.
Thats the basics of it, ofcourse putting it to good use is always very difficult. However I have been meaning to do something similiar (create some core classes for all my applications) and this could be very beneficial for me as well. What kind of experience with PHP and MySQL do you have? Would you be willing to make the application GPL and work with a team?
|