Home » , » MVC architecture of CakePHP

MVC architecture of CakePHP

Written By Unknown on July 28, 2014 | Monday, July 28, 2014



After Introduction To Cakephp takes after the MVC programming outline design. MVC Programming example will separate the application into three sections: 
  • Model layer 
  • View layer 
  • Controller layer 

The Model layer 

The Model layer speaks to one piece of the application that executes the business rationale. Models are representations of database tables. They can interface with database, question it and spare information to the database.

So as to work with MVC its exceptionally vital to note that there must be no connection in the middle of models and views.all the rationale will be taken care of by controllers. It's in charge of bringing information and afterward in the wake of changing over them into genuine ideas for the application by processing,validating, partner or other comparable undertakings identified with taking care of information. 

MVC Request



The View layer

You can portray Views as format documents that present their substance to the user.variables, exhibits and questions that are utilized within perspectives are enlisted through a controller.a presentation of the demonstrated information will be rendered by the View.view will create the presentational interface for your application utilizing the data it has accessible. 

Case in point, A set of information returned by the Model layer, will be utilized by the perspective to render a HTML page holding it.the View layer is not just utilized for HTML or content representation of the data,but additionally used to convey a wide assortment of formats.like features, music, archives and other organization. 

The Controller layer

Demands from the clients are taken care of by the Controller layer.controller basically holds the rationale of your application. Controller offers different functionalities,they recover the information and adjust them by getting to database tables through models.they likewise enlist the variables and questions, that might be utilized within perspectives. 

You can consider the Controllers as chiefs taking mind that all required assets for finishing an errand are designated to the right specialists. They hold up for petitions from customers, and afterward checks their legitimacy as per the guidelines of verification or approval, handling to the model, and chooses just the right kind of presentational information which are relied upon by the customer ,to at last delegate this rendering procedure to the View layer.

0 comments:

Post a Comment