Overview of Asp.Net MVC

Posted on Updated on

articleAsp.Net MVC

MVC stands for Model-View-Controller. It is an architecture used for developing user interfaces. We can say that, it is an assembly for web applications to follow the set pattern in order to guarantee the efficiency and consistency. There are many frameworks that support MVC architecture, including ASP.NET, CodeIgn are some of them.

untitled.netNow the question arises, Why to use MVC???

So the answer is very simple, to separate the application into different layers according to its functionality. MVC is itself a very light weight, highly testable presentation framework that is integrated with existing ASP. Net features such as master pages and member-ship based authentication. The definition of MVC is given in System.Web.Mvc assembly. It is not necessary that all the application support the MVC in same manner. Some sites are very good with MVC while some work well without MVC and some can use the combination of both.

MVC Model Design

The main components of MVC model are-

 

  1. untitled.net2MODEL: This part is used to build the logic for the application’s data domain. These are basically used to store and retrieve the model state in the database. As a Student object may retrieve the information from the database, perform operation on the existing data and then save the updated information back to the Student’s database. But, this is not applicable to small application where we have to just view the data from the database. In such case the work of model is performed by the dataset and physical presence of model layer is not there.

untitled.net32. VIEWS:Whatever one sees on the screen is the View component of the model. It is mainly used to display the user interface of the application. This user interface is created from the model data. For example to make the contents of the Student table visible we can show the data in textboxes, drop-down lists and checkboxes based on its current state.

 

untitled.net43.CONTROLLERS: Controller is the middle man of the application that handles the user interaction, work with the model and finally select the view to make available what to display in User Interface. The controller not only handles but also responds to the user input and interaction. The controller handles the query string values and passes these values to the model which may be used to query the database.

 

MVC File Structure

File structure of MVC is quite simple. It has three separate folders for Model, view and controller each which are linked to each other. Beside these, there may be other folders also in the application.

MVC Diagram                       

untitled.net5

  1. controllers/

updateUserController.php
showUserController.php
manageContentController.php
manageBlogController.php

      2.  models/

User.php
Blog.php
Content.php

      3.  views/

userProfile.php
userEditProfile.php
contentPage.php
postPage.php
index.php

*****************************************************************************************************

For more details and queries please feel free to email, visit or call us. Wishing you the very best for all your future endeavors.
Helpline: 9814666333, 8699444666
Email: info@technocampus.co.in

Please fill the form and we shall contact you soon.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s