programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Website by URL, How to Play YouTube Videos in by using Jquery , Jquery Change div background on mouseover in , JQuery UI Datepicker (Calendar) etc.

Monday, February 29, 2016

Application Structure in Asp.Net MVC Project (Application)

Structure in Asp.Net MVC Project (Application):

Model–view–controller (MVC) is a software architectural pattern which comes with Model, Controller and View Folder in it.

Each folder has different meaning in it. Here we will learn complete folder structure of mvc project or application in detailed manner

Model Folder

The model folder represents the data your application will work with. This classes are mostly use for accessing database for performing various DML Operations. 

Controller Folder

The Controller folder contains all Controllers in it and if you closely observe names of controllers you will find that every controller ends suffix with “Controller” name in it. It's name convention for controllers which we need to follow in mvc.

e.g. If we have Controller with name MobileController and Model with same name Mobile then there will be Type clash (in case if we use same "Mobile" as controller name) for that reason we need to write Controller in suffix.

View Folder

The View folder contains all application Views in it. If we look into this folder it contains Folder with name of Controller and inside that it will have views related to that controller in it. If we just expand View folder we will see that it has a sub folder inside it with name Shared it will have all view which are shared among controller init.

This kind of convention will help us to reduce time of development and help for maintenance. If you check following image you will understand model, view and controller folders clearly.

Other Related Post:

No comments:

Post a Comment