Php – CMS design patterns and considerations

content-management-systemdesign-patternsPHP

I am creating the cms for a relatively simple site – portfolio, some general content pages, custom blog etc.

What are some of the best patterns to consider before diving into the design.

I want the system to be as flexible as possible without being too complex.

I have looked for some good resources that discus cms and blog design but can't find anything too good.

My language is php but I suppose I am looking for more language independent advice.

Best Answer

Flexibility without complexity... nice program.

Maybe you're a genius and you will make something that feet your needs. But I think the biggest problem you will face is security and robustness. So really, take other advices on this page and have a look at wordpress, drupal, joomla and ezpublish. A lot of security stuff is already done. And not only security...

So, study some of these tools, track their flaws, check their security policy. Study how they handle caching, sessions, bootstrap, absolute & relative url managment, documents (images, videos, etc), ajax, authentification, identification, acl, user interfaces, rich-text editing, migrations, templating, page composition, content filtering (I try to remove the things you won't need, plugins, database abstraction, fine caching, css and js minification, all the extra-complex stuff not needed for a single instance simple CMS). Soon you'll have a 'picture' of the stuff they've done.

By doing this work, you'll certainly notice some big differences, and mistakes. You'll start going on irc and flaming developpers, telling them that others have done better choices. You'll start forgetting to shave. You'll maybe do some contributions. Some will be accepted, others won't. Old core devs doesn't like when someone explain why they made mistakes (and they make mistakes).

Now, comes the day you have a beard. Some of your contributions will start looking like forks. You will have ennemies, and friends, or followers. And you will start feeling the force.

And you will go on irc and tell god that the world is ugly and that you'll make the first CMS which will be flexible without being complex. And people will cry. And birds will run in circles. And you will be able to explain what are the design pattern of a CMS.

  • I am a user. I know what I want. Doing what I want will make user happy. I'm happy.
  • You shall not trust code from people with glasses
  • "MVC MVC MVC" : and the people responds 'that shall be done'

Seriously, There's still a place for a good CMS with disruptive innovation, the fork history has started long time ago with phpNuke (as far as I can remember). But some of the actual products are really fine for most tasks.