In past days coding has been done with flat way or another way its called flat coding where there no standard has been followed for coding. Design related stuff, business logic and database related queries everything will be at the same place.
This approach is not good for bigger websites/ software. Because by flat coding following problem has been arisen
- No Modular approach so not much scalability.
- Hard to detach dubious area if application logic complex.
- Hard to maintain if application logic complex.
- Everything is on the same page, so one user can work on time, means designer and developer will have depending.
To overcome above controversy, the new programming pattern has been introduced which is called MVC, and also known as Model-Controller-view. In this approach, coding has been divided into three parts which are modelled, controller and vide. All things which are related database will be part of the model, all business logic are part of the controller and presentation is part of the view.
In PHP, there are many mvc frameworks are available like Cake PHP, Zend, Yii, CodeeIgniter etc.
Why Framework ?
- MVC Support
- OOPS Support
- Everything is well structured and well defined so easy to apply
- Easy for Maintenance
- Library support for a day to day function which minimize coding
- Caching, Database optimization, XML, ORM etc. key things is in built so easy to use
- Inbuilt support for 3rd party vendor support like PDF, BAR CODE
- Easy to Extend by Plug-in or Modular Approach
- QA support by Test Suit
- In built support for Ajax, validation, tempting, form or html functionalities
- Inbuilt performance related utility
- Easy to upgrade for new functionality