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.
An overview of creating a website in ASP.NET MVC
The aim of this blog isn't to be a full tutorial in MVC (that might follow in the fullness of time); rather it's to explain what the process of creating an ASP.NET MVC website involves.
This blog should be especially useful for classic ASP.NET developers wondering whether to learn the Model-View-Controller (MVC) approach to website development.
The aim of this blog will be nothing if not modest: we'll aim to take a table of films (Americans - read "movies") in SQL Server ...
The table of films we want to show in a web page.
... and display it on a webpage:
What the final webpage should look like.
The steps needed to accomplish this
This blog will show the steps needed to create this ASP.NET MVC website:
|Create the website||I'll be showing how to do this using Visual Studio 2012 and C# (you'd be foolish to use VB).|
|Create an entity model||This will explain about your choices for accessing data using classes, and how to create an entity model.|
|Create a view model||How to create a class upon which our view will be based (including writing the LINQ needed to get at the data).|
|Set the router, and create the controller||Make sure that we can get to the web "page" containing our list of films.|
|Create the view||Finally, create the view showing the list of films, and display it in our browser.|
|Conclusion||A summing-up of what we've discovered along the way!|
I won't be explaining much about the C# code used along the way; my aim is to give an impression of how MVC works, and how it is completely different to classic ASP.NET webforms.
Let's start with creating the website!