(I hope I've not posted this in the wrong forum: I'm actually looking for input on my approach, not the coding directly).
I want to write my own CMS (with basic features I always need) for my future projects.
I've tried two times before but had to stop due to lack of planning.
Lately I've been reading about MVC (Model-View-Controller) designs and registry patterns.
I've come up with a solution that I think might work.
I have a registry class to store all objects and a module handler which fetches output from the different modules (like a router).
But in this example you can load several modules simultaneously. That means you can assign module-output anywhere on the page (as main content, block content, etc).
The 'main module' (requested by user, think $_GET['mod']) will always be responsible for the main content (the body of the page). But every other module can also be loaded and create output for other parts of the page (like a poll in a block).
My approach is best explained by looking at a simplified framework I wrote.
http://pastebin.org/2655 - View code
Comments? Is this a stupid idea?
Also, if anyone has something to say about the object oriented programming in this example, that would be great. I'm still learning, and it would be nice to know if I've grasped the basics, e.g. how the registry object should be treated.
Thanks in advance.