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.
Today Microsoft announced a new product in the Visual Studio line. This product is called LightSwitch. This product allows one to develop very useful business application with a minimal amount of hands-on coding.
I have had the opportunity to watch this product evolve over the past 3 years. However, non-disclosure prevented me from sharing the product. Now I can talk.
This is a very exciting piece of software. I truly believe that this product will impact the developer environment in a way Visual Basic did back in the mid 1990’s. It can be used to create very nice applications, both from a UI and background code perspective. It supports both VB and C# as the background language. End-user domain experts will be able to create applications with a minimum amount of training.
I view this as providing end users with tools similar to the original Visual Basic and/or Access. However, unlike these earlier tools, LightSwitch is built on the .NET Framework with all of its power.
The beta will be released on August 23. I plan to start creating tutorials for this product and share them with you. Hopefully you’ll find this new tool very valuable.