Articles → ASP .NET MVC → Create Your First Asp.Net MVC Application

Create Your First Asp.Net MVC Application





  1. What programming approach do traditional asp.net applications follow?
  2. Why did MVC come into the picture?
  3. What are the benefits MVC is providing?

Why Asp.Net MVC?




  1. ASP.NET MVC provides a clean separation of concerns.
  2. ASP.NET MVC enables test driven development i.e. it is easy to write unit test cases.
  3. ASP.NET MVC does not support view state, so MVC application page size is lighter as compared to traditional web form application
  4. ASP.NET does not support post back events so ASP.NET MVC application is quicker in performance as compared to traditional web form application.



What Is MVC?




  1. Model – It describes the data as well as the business logic of the application.
  2. View – It displays the user interface of the application.
  3. Controller – It handles communication with the user and controls overall application flow.

Create Your First Asp.Net MVC Application




Picture showing selecting the ASP.NET MVC 4 web application type project from the project templates
Click to Enlarge



Picture showing selecting the view engine for the ASP.NET MVC 4 web application
Click to Enlarge





Picture showing the project structure in the solution explorer in the visual studio
Click to Enlarge



Picture showing the application page of your first asp.net mvc application
Click to Enlarge



Folder NameDescription
App_DataStores data files like MDF.
App_StartConfiguration code like routing, bundling etc.
ContentCSS files
ControllersFor storing controllers files.
FiltersFor putting filter code.
ImagesStore images used in the site
ModelAll model classes (classes where the business logic is written).
ScriptStores script files.
ViewsAll view files (user interface files)



Posted By  -  Karan Gupta
 
Posted On  -  Monday, June 8, 2015

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250