Header Ads Widget

Responsive Advertisement

ASP.NET MVC- INTRODUCTION

ASP.NET MVC
 INTRODUCTION

“In February 2007, Scott Guthrie (“ScottGu”) of Microsoft sketched out the core of ASP.NET MVC.”

ASP.NET MVC is a framework for building web applications that applies the general Model-View-Controller pattern to the ASP.NET framework. ASP.NET MVC has been under an open-source license since the initial release, ASP.NET MVC applications, by default, rely heavily on conventions. This allows developers to avoid having to configure and specify things that can be inferred based on convention. 
Model-View-Controller (MVC) has been an important architectural pattern in computer science for many years. Originally named Thing-Model-View-Editor in 1979, it was later simplified to Model-View-Controller. It is a powerful and elegant means of separating concerns within an application (for example, separating data access logic from display logic) and applies itself extremely well to web applications.

The ASP.NET MVC separates the user interface (UI) of an application into three main aspects:


The Model (M):
 A set of classes that describes the data you’re working with as well as the business rules for how the data can be changed and manipulated 
 A set of classes that describes the data you’re working with as well as the business rules for how the data can be changed and manipulated. These are the classes that represent the domain you are interested in. These domains objects often encapsulate data stored in a database as well as code that manipulates the data and enforces domain-specific business logic. With ASP.NET MVC, this is most likely a Data Access Layer of some kind, using a tool like Entity Framework or NHibernate combined with custom code containing domain-specific logic.

The View(V): 
View defines how the application’s UI will be displayed.
 This is a template to dynamically generate HTML . View defines how the application’s UI will be displayed. The view is responsible for providing the user interface (UI) to the user. After the controller has executed the appropriate logic for the requested URL, it delegates the display to the view.

The Controller(C): 
Controllers within the MVC pattern are responsible for responding to user input, often making changes to the model in response to user input. In this way, controllers in the MVC pattern are concerned with the flow of the application, working with data coming in, and providing data going out to the relevant view.
 A set of classes that handles communication from the user, overall application flow, and application-specific logic.
This is a special class that manages the relationship between the View and the Model. It responds to user input, talks to the Model, and decides which view to render (if any). In ASP.NET MVC, this class is conventionally denoted by the suffix Controller. Like HomeController here Home is the name of controller and it is convention that every controller name must include Controller after their name. 

Post a Comment

0 Comments