Contents tagged with ASP.NET MVC
-
Book Review: ASP.NET MVC in Action
I've had the pleasure of being able to review ASP.NET MVC in Action in it's early access form. If you've not heard of this program, Manning has a program called MEAP (Manning Early Access Program) which allows you to purchase the book before it's published and gain access to it in PDF form as the author makes the chapters available. In this case, I've been reading parts of the book nearly a year before it will be physically published in Sept 2009. I highly recommend checking that out, as I've participated a number of times. In fact, I purchased C# in Depth, 2nd edition over the weekend in MEAP. I have access to the 1st edition via PDF, access to the 2nd edition in PDF, and will receive a hard copy when the 2nd edition is published. An excellent way to receive books in my opinion. Anyway, on to my review of ASP.NET MVC in Action.
-
Book Review: Programming .NET 3.5 by O’Reilly
I just finished reading a review copy of “Programming .NET 3.5” from O’Reilly. The book, published in August, is an overview of the latest .NET Framework revision. You’ll get an introduction to the topics that have been introduced along the way that include technology from .NET 2.0, .NET 3.0, and the latest version; .NET 3.5. Also included are libraries such as ASP.NET MVC and Silverlight.
-
Dependency Injection was made for ASP.NET MVC
It's not that you can't use dependency injection in any .NET application, because you can. It's just that dependency injection fits so well in the ASP.NET MVC programming model. While building up a simple example for how my new application would be architecturally designed, I found using dependency injection with Web Forms as troublesome as trying to fit a square peg into a round hole. After some modifications and adjustments, I could get it to work, but it just didn't feel like a solid fit and certainly didn't make me any more productive.
-
Microsoft ASP.NET MVC
By now we've nearly all heard of the ASP.NET MVC framework available in CTP form. The Model View Controller architecture has been around for quite some time but more popularly in the desktop world. Java has seen its share of MVC web frameworks over the years and just a few years ago Ruby on Rails crashed the party with its own MVC implementation for a rapid development environment. Once Ruby on Rails hit, all of a sudden MVC was all the rage. It wasn't long before these frameworks became available as extensions for ASP.NET. Microsoft has now joined the party with an official feature due towards the middle of 2008. In the last few weeks the ASP.NET team has shipped a CTP release for feedback and to get people started with the technology. I've looked at it quite a bit myself and I'm loving what I've seen thus far.
There are a number of reasons to be excited about this framework. Some of the biggest are separation of concerns, testability, and performance.
Separation of concerns allows you, the developer, to create self aware components that don't heavily depend on another un-related component to function. Think about removing the logic of your postback event in ASP.NET 2.0. Take that code and move it somewhere more centralized that will be used by similar web views. That concept is the relationship between the Controller and the View. The View should simply display something while the Controller should tell it what to display. The Model describes the data and is used by your Controllers and Views as something I like to think of as a transitional object.
Testability is a major concern with most developers these days. Currently automated unit testing is nearly impossible with the current Web Forms architecture present in ASP.NET. Sure, you can unit test your data and business layers. However, once these layers reach the presentation layer, testing expected behavior just isn't possible in an automated fashion. The ASP.NET MVC framework allows testability through the separation of concerns along with the way a Controller will dictate which View is rendered. That functionality allows for easy testability.
The final reason I'll discuss here is performance. ViewState is a piece of magic all too often by the Web Forms architecture and simply is a bloated method for persisting data across HTTP requests. The ASP.NET MVC framework will remove this dependency and will provide better performing environment for our web applications.
I'm in the planning stages of a new project and really investigated whether I should begin ASP.NET MVC development. Since it's so new I'm not going to risk it but I encourage everyone to keep an eye on this project. I'll definitely be doing that and will be all over a release closer to RTM.
Resources:
ScottGu - MVC Tag
Phil Haack - ASP.NET MVC PM