BLOGS BY TOPIC
BLOGS BY AUTHOR
BLOGS BY YEAR
This blog explains the steps you'll need to follow to create a simple one page website in ASP.NET MVC. The aim of the blog is not to act as a tutorial, but to help people choose between ASP.NET MVC and classic ASP.NET.
Posted by Andy Brown on 16 June 2014
You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
In ASP.NET webforms (classic ASP.NET), you have one file for each web page, and this contains all of the HTML and code that the web page needs in order to work.
In MVC you have to create:
|Part of MVC||Notes|
|A router||... to determine which controller should handle any page request.|
|A controller||... to create a view model class to be used by a view, and then return the view itself.|
|A view model||The class upon which the view should be based.|
|A view||The HTML and C# file determining what the browser should display.|
Along the way, I've had to show (without much explanation):
- The LINQ database language.
- Classes and namespaces.
I think what'd I'd say in conclusion is this: MVC is a better tool for creating websites, but don't use it unless you're very comfortable at programming classes!