• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scope of a CMS

This is a complicated topic because there are a lot of implementations possible. When I personally develop something which needs CMS functionality, I try and ensure that it is heavily abstracted between data (content etc) and presentation (html, css etc). I also try and ensure it is as modular in nature as possible and has a relational database design.

I use the default (root) controller to process all incoming requests, and it has associated functions and models which then parse and fetch any relevant data from the database. Here is a very simplified overview:


In the above example, the default controller first checks the segments in the URL. In this case there is only one segment (about). This info is passed over to a model which checks and matches it to any related entries and content. The model then sends this data back to the controller, which can process and parse it as variables and strings. The content is finally sent over to a view file which has just a simple skeleton structure, so that any content, navigation etc is filled-in from the data we just sent it.

The controller can also able to check if there are multiple url segments, meaning it can work with the models to determine if the page is in a different category/section etc. For example:


The above url is a football page in the sports category. In the database there is a table called 'categories', and the model can check to see if there is a match in it for 'sports'. If it fins one, it can also check if the category entry contains anything else, such as if it needs to have a different view file than the default one. Once the model has passed this info back to the controller, the controller can then specify that a different view file needs to be served up with this page because it is in the sports category. The view can have a completely different style to the other ones, and use different css, html etc anything you want.

For admin I would have separate controllers for this as this is a wholly different job (admin user auth, editing/updating database entries etc). I would even put the admin section on its own sub domain for extra security (such as https://cms.example.com/).

Hope this helps.

Messages In This Thread
Scope of a CMS - by El Forum - 01-07-2010, 04:40 PM
Scope of a CMS - by El Forum - 01-07-2010, 11:39 PM
Scope of a CMS - by El Forum - 01-08-2010, 03:33 AM
Scope of a CMS - by El Forum - 01-08-2010, 04:14 AM
Scope of a CMS - by El Forum - 01-08-2010, 07:09 AM
Scope of a CMS - by El Forum - 01-08-2010, 07:54 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.