we are going to discover about the very basic concepts of the MVC architecture .It is for the novices to MVC.
MVC stands for model, view, controller .MVC is a architecture Design pattern. Microsoft.net MVC Framework enables to develop MVC applications.
The basic component of starting the application is the controller . The client browser sends request to the controller. MVC Framework map the URL to the classes that are referred as controllers.
Controller is the component of the MVC that acts as an interface between the view component and the model component.
Controller process the input request handles the user input and interactions and execute the appropriate business logic.
The default isHomecontroller.
The controller defines action methods and it can contain many number of action methods as needed.
Action methods possess one to one mapping with the user interactions.
The Global. asax file defines the Routing rules and the MVC application parses the URL to determine the path of the controller. The controller then determines the appropriate action method to handle the request.
By default the URL is considered as a sub path that includes the name of the controller followed by action method name.
The action method in the default Homecontroller is the Index.
However we can change the name of the Homecontroller to some other name and the name of the Index action method to some other name in the RouteConfig class.