AspBucket offers ASP.NET, C#, VB, Jquery, CSS, Ajax, SQL tutorials. It is the best place for programmers to learn

Tuesday, 29 September 2015

MVC introduction

In this article we are going to discuss what is MVC? Full form of MVC is Model-View-Controller (MVC) original named was Thing-Model-View-Editor later it was simplified to Model- View-Controller in 1979. MVC is a framework for building web applications using a MVC (Model View Controller) design. It is used in lots of frameworks . You will find MVC in PHP, Java, Ruby and many frameworks.

Models: These are the classes that represent the domain you are interested in. These domain 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. Data validations is also implemented in model classes.

 View: This is a template to dynamically generate HTML.

 Controller: 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. All Code logic is implemented in this section.


Post a Comment

  • Popular Posts
  • Comments