I submitted chapter 1 of “cms design using jquery and php” yesterday.
I’ve been building and using CMSes for over ten years, and the more I do it, the more I realise that “less is more”.
In the beginning, I was writing CMSes that had absolutely every aspect of the requirements hard-coded. That made the system fast but inflexible.
Over the years, though, I started figuring ways of breaking the system up into more modular bits and pieces, that could be enabled/disabled depending on the job.
This is the essence of what “plugins” are about – you have a single core system which includes only the absolute essentials, and into that, you put whatever plugins you find necessary for the job you’re doing.
The trick, though, is in deciding what is a plugin and what is not. This is very important to figure out – if something should be a plugin, it should not be in the core, thus making he core more stable and manageable. Conversely, if you make something into a plugin which is necessary for normal use of the CMS, then it makes the system less stable.
An example of this dilemma is user logins. Obviously, you need to have user logins for the admin area to work, but you don’t need user logins on the front end of the site.
So, should user-logins be a plugin or core functionality? The solution is a mix of both – you need to create a hard-coded user login specifically for the admin area, and if you want users logging in to the front end, that is a plugin, even though they both use the same database. The difference is that the admin login area is at a defined point (when you access the admin area), while making the frontend login into a plugin allows you to place a login anywhere you want.
Anyway – over the years, I’ve whittled away at my own CMSes until I realised that the core functionality of a CMS consists of just three things:
- display and editing of “normal” pages
- user and role administration
- plugin management
It’s impossible to cover those three items in just one chapter, but once they are covered, that basically completes the CMS!
When you have the above three items completed in your CMS, you can then work completely on plugins, making the system stable and yet flexible.
Of course, there are some fine details (templates, UI, optimisation, DB structure, etc.) that go into completing those three items, but that’s basically it.