Cakephp is an Easier And Huge Supporting Framework
CakePHP is a popular, free and rapidly developed framework of php. CakePHP is an easier and huge supporting framework. It followed MVC architecture pattern and the ORM. CakePHP is a rapidly development and the most popular framework now a days for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. The CakePHP framework provides a robust base for your application.
It can handle every aspect, from the user’s initial request all the way to the final rendering of a web page. And since the framework follows the principles of MVC, it allows you to easily customize and extend most aspects of your application.
CakePHP Application Structure CakePHP is based on an MVC architecture that is both powerful and easy to understand: Controllers, Models and Views guarantee a strict but natural separation of business logic from data and presentation layers. If I want to enplane by one line, then I will say that, view for the user to see, model for the connection between DB and application and controller is the big boss who controlled everything. Now I want to give some description.
Controllers contain all of the logic of your application. Each controller can offer different functionality depends on the business logic; controllers retrieve and modify data by accessing database tables through models; and they register variables and objects, which can be used in views.
Models are active representations of database tables: they can connect to your database, query it (if instructed to do so by a controller) and save data to the database by creating the object of the represented table. It is important to note that in order to correctly apply the MVC architecture, there must be no interaction between models and views: all the logic is handled by controllers. That means a model create a abstract object and maintain the connection with DB. Serve the purpose according to controller to retrieve, save, update and delete data. Views can be described as template files or output that present their content to the user: variables, arrays and objects that are used in views are registered through a controller.
Views should not contain complex business logic; only the elementary control structures necessary to perform particular operations, such as the iteration of collected data through a for each construct, should be contained within a view. Throw a view, a user can give input and get output from the application. It’s just used for this.
This architecture can greatly improve the maintainability and the organization of your site’s code: ??? It separates business logic from presentation and data retrieval. ??? A site is divided into logical sections, each governed by a particular controller. ??? When testing and debugging an application, any developer accustomed to CakePHP structure will be able to locate and correct errors without knowing all of the details of the code.
Controllers, models and views are stored in pre-defined directories within CakePHP directory structure. Here’s the directory structure that’s used: ??? app/ ??? config/ ??? controllers/ ??? models/ ??? plugins/ ??? tmp/ ??? vendors/ ??? views/ ??? webroot/ ??? cake/ ??? config/ ??? docs/ ??? libs/ ??? vendors/