
Old layered architecture
|................................| PL (Presentation Layer) |................................| Client
MVC is a part of architectural patterns that have an important place in Software Engineering.
The model is the section in MVC where the business logic of the project is created. Along with business logic, validation and data access operations are also carried out in this section.
View is the section where the interfaces of the project are created in MVC. In this section, there are HTML files of the project that will be presented to users.
Controller is the section that controls the internal processes of the project in MVC. In this section, the connection between View and Model is established. Requests from users are evaluated in Controllers, which operations will be performed according to the detail of the request and which View will be returned to the user (response).
Life Cycle of MVC
1) HTTP Request: Your request to view each ASP.NET MVC application is a request. What you want is received by IIS over HTTP. Every request you make is responded to by the Server. It must end.
2) Routing: Every time you make a request to the ASP.NET MVC application, the response you make is UrlRoutingModule It is stopped by the HTTP Module. When the UrlRoutingModule stops a request, the incoming request It is decided which Controller will take over the RouteTable.
3) Controller: Which Action the Controller will run according to the route information coming from the RouteTable? View is run. View is not rendered by Controller. ViewResult back by Controller is returned. 4) ViewResult: ViewResult calls the active View Engine to render the View.
5) ViewEngine: When you create a CSHTML file, the scripts and markups inside Razor View It uses some ASP.NET APIs by Engin to translate your pages into HTML.
6) View: The codes translated into HTML by the View Engine are presented to the user.
7) Response: View is displayed to the user via HTTP.
Comments
Post a Comment