Understanding About APS MVC

No Comments
Building Website is not easy yet , to make your website become creative and security you need to follow along and develop in many language and especially code structure. in this post we will getting start to understand ASP Application with MVC which is a new way to buiding a website with ASP
ASP MVC has important 3 part is M , V and C
M stand for Model
V stand for View
C stand for Control
so let start to understand what is Model  and What is View , What is Control

  1. Model: this is where all the business logic of the application resides: it can range from a simple static class that returns a dataset to a complex multi-assembly Business Logic Layer that uses an assembly specific to the Data Access Layer. 
  2. View: at the other end of the application is the View, which displays the application's user interface and contains the representation of the data that have been retrieved by the Model. This doesn't have logic, other than the one strictly related to the presentation of data. 
  3. Controller: between the two components stands the Controller. It acts as the orchestrator of all the interactions among the other components and the users: it handles the requests, reads the form values, passes them to the Model, decides which View to render and finally sends the data to be rendered to the View. 

Interaction between Model , View and Control 

  1. The request comes from the client and hits the Controller. 
  2. The Controller calls the Model in order to perform some "business" operations. 
  3. The Model returns the results of the operations back to the Controller. 
  4. The Controller decides which View needs to be rendered and sends it the data that must be rendered. 
  5. Finally the View renders the output and sends the response back to the client. 

0 comments:

Post a Comment

Follow us :