Question

I am working on a CMS application which has been written in procedural style of php programming.But now as the new features are to be added,it becomes difficult to handle some parts as the application.It is reaching to a complex stage and we need to RESPECT the complexity.
So,now we are planning to build it using the object oriented style of programming which is a better approach in terms of control.But,its difficult to make out where to start from?
What I mean is,which parts would be converted to classes,what exactly would be the model part and also I want to be able manage a centralised control over the application control as it a CMS ,it will have domain and sub-domain creation.
One thing I am clear is a database class will be needed with select,update,insert,delete functions and connection details,but other modules like login/registration,payment process,Email functionality using templates,logging and debugging,Exceptions handling(Messages for success and failure). Will converting them to classes make a difference?
Is there any framework or CMS,(Tried referring wordpress/codeignitor,but I can adopt only few features out of it) I can refer which does something like this? I know it is a bit descriptive but I am new to Object oriented php programming and I have never architected any application.This is a learning process and I would like the expert suggestions/views as I have been getting earlier to make a decision.
Thank you for your time

Was it helpful?

Solution

Pick any of major PHP frameworks ZendFramework, Symfony, Silex, Slim ... and build your CMS on those. Those framework already have most of components you need. Plus they have big communities behind, so you will not have to maintain that code.

If you still want to write your own framework. Take a look in to http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller for Handling requests. No need to create DB classes as PDO http://php.net/manual/en/book.pdo.php is a nice built in abstraction layer you can use.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top