New Tutorial – ASP.NET MVC Version 2
I just posted a new tutorial that covers the Microsoft ASP.NET MVC 2 Framework. The Model-View-Controller (MVC) pattern has been around a lone time (I was first introduced to it in the Java world.) MVC clearly delineates the function of presenting a view, managing a model (usually data access and business rules), and managing and coordinating these activities via a controller.
In this tutorial, I take my “golf handicap” application and implement it using the MVC pattern. You will see how to set up controllers for major functionality and how to add action methods within a controller. You’ll also see how views are generated and called from the controllers. You’ll also see how URL mapping is used to access the various controller action methods.
My model is built from an SQL Server database and I use the Entity Framework to provide a mapping between the RDB and the entity model. I also create a number of specialized POCO classes that I use to provide presentation views.
You’ll see how both server and client-side validation is implemented in the MVC Framework.
Microsoft is very clear in stating that their ASP.NET Web Form model (the way things have been in ASP.NET since it’s inception) and the MVC model are viewed as equal partners in the Microsoft set of tools. They assure us that they are just providing alternatives and do not recommend one approach over the other.