I've been using the ASP.NET MVC extensions tonight; this is the first time I've played with it.  My initial reaction is a bit mixed.

The first thing that I got irritated by was that I cannot use any of the ASP.NET validator controls.  I was creating a login form with email address and password, and I wanted to require both of the fields.  With MVC, I can't just slap a validator on and call it a day; I actually have to write the validation logic myself.  Oh, and I can't just use a ValidationSummary control either--I have to render a list of error messages that I manage myself.

Honestly, I was at a bit of a loss for how to go about implementing the validation and the feedback to the user.  Fortunately, Google is my friend and it reported to me that Daniel Root posted a How To that could point me in the right direction.  Daniel's post got me moving and I got past roadblock number one.

After that, it was actually pretty smooth sailing.  A couple of hiccups with anonymous types syntax, some refactoring of controllers/actions while trying to get used to the paradigm, and then a little snag with creating a checkbox list.  Rob Conery to the rescue there though (for the most part).  I couldn't get the CheckBoxList to bind against an IList<string>, but using a string[] worked like a champ.

The project I'm using to test this MVC framework out has a wizard that will be commonly used.  The wizard is extremely dynamic, which is traditionally a difficult challenge in ASP.NET.  For instance, one place where the wizard will be used shows a checkbox list as the first step.  The user selects one or more products, and then they will be prompted with additional steps for each product selected.  Of course, product steps need to be very modular so that new products can be plugged in easily.

After stubbing out this process and getting a couple of products working, I am starting to see how the MVC framework will really help me out on this project.  The product steps are completely independent, with excellent SoC going on.  They don't know much about the wizard that hosts them right now either, so that's nice.

The project is in prototype phase right now and I've determined that I'll build the entire prototype/proof of concept using the MVC bits.  At the end of the prototype phase, I'll determine if MVC will work or not.  I already know that it's going to be difficult not to implement my Extended MVP Pattern, but I hope to resist the urge so that I can be comfortable with the framework as it is out of the box.  If I stick with MVC for the true development phase of the project, I might consider implementing my own pattern at that time though.

At this point, I think the ASP.NET MVC framework shows promise.  It feels like a step backward losing validation and some other goodies in WebForms, but I'm going to give it a shot.

Technorati Tags: ,,,,