Creating a modular object oriented PHP CMS
Please note: This site is pretty old now and some parts of the system have been streamlined since writing this. The core ideology is pretty much the same but we have added a few improvements like using Registry instead of a global array.
We will also compare the performance of our system with some leading CMS's.
The new site will be published in due course but feel free to have a look at the original design, there is not much wrong it, either.
This tutorial site sketches a working solution for a modular application framework using Object Oriented PHP. The 'CMS' standing for "Content Management System" is in the name simply because that is more familiar to progrmmers than, say, WAF (Web Applicaton Framework). The key ideas of SpookyCMS are
- Separation of display from control logic - use templates
- Minimalism - the less code you need the fewer problems
- A 'collector template' that contains the display logic
- Extendability - write new modules with ease
What do you need to know
If you are not s developer and only interested in having something like this installed or have some training on please contact us.
If you want to develop it further and install it to a web server things are a bit different. You need to know how to write PHP code in an object oriented manner. If you have no idea about objects and how to use them you may still get the idea as this is far from an academic approach.
You need to know HTML or preferably XHTML and with some JavaScript. Plus CSS, of course. If you do not know these concepts it will be almost impossible to develop web applications.
Additionally you must also know how the basics about how a web server works and - needless to say - you should have one available.
Issues covered
We will concentrate on the basic ideas of building a simple CMS concentrating on modules and templates and how they are coupled. Database functionality will be kept as simple as possible.
Issues not covered
As for security we will have a look at only the simplest measures to filter out the most obvious hacking attempts. If you want to create an ultimately safe system you will have to do a lot more research on the subject. On the other hand there are hundreds of thousands of live websites a lot less secure than our humble creation.
Some thoughts
This is a collection of ideas, not a designer's or a progammer's tutorial. My knowledge of the CSS box model is adequate but I am not a guru. So I may have fallen into some traps while converting the original table approach to a simple floating
<div> layout. We hope to have succeeded in hitting close to the target, however. The PHP code it keep to kind-of-a RISC (reduced instruction set computer) paradigm which will result on easier-to-read code and good performance.It is possible that a more MVC-orthodox tutorial is released some time in the future.
Anyhow, all corrections to he layout and the code are welcome.
The name "SpookyCMS"
There is no good reason for using the name. Well, maybe Simple PHP Object Oriented... something. We had in mind to create the acronym from Personal Object Oriented CMS but we were told that this would not be a very good idea
:-)