CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeffrey Palermo (.com)

Blog moved to www.jeffreypalermo.com

ASP.NET MVC Framework big changes since Dec CTP

 For more stuff on ASP.NET MVC, subscribe to my feed:  http://feeds.feedburner.com/jeffreypalermo

If you installed the December CTP of the ASP.NET MVC Framework, you had to install it.  The assembly was registered with the GAC, and you didn't have to deploy the assembly.  The original plan was to release the MVC Framework with a service pack of .Net 3.5.  That is no longer the plan.

In the March CTP, System.Web.Mvc.dl, System.Web.Routing.dll, and System.Web.Abstractions.dll can all be deployed to the bin folder.  They don't require the GAC.  I like that a lot.  I recently deployed www.partywithpalermo.com using the March CTP drop of the MVC Framework.  I have .Net 3.5 on the web server, and it was super simple. 

Routing is a bit different.   Make sure to change [controller]/[route] to {controller}/{route}.  Minor change.  Overall, I'm actually using to using {} for tokens because of all the NAnt build work I've done (NAnt uses ${prperty}).

Routing can be used with existing apps.   If you have every done url rewriting (I have), you know how painful it can be.  Now that routing is in a separate assembly, you can use it with any ASP.NET app you wish.  I really like that concept because routing doesn't care if you are using the mvc handler or page hander.  It works for parsing urls either way.

Overall, I'm pretty impressed with this CTP (and it is a CTP).  It is not done yet, and Microsoft makes no claims that it is complete.  It's the second public drop of a new, fledgling framework.  The core, in my opinion, is the routes, controllers, and handoff to the views.   All the other stuff is ancillary.  Once the core is there, libraries like MvcContrib can start adding on extra features.  For instance, I'm looking at leveraging the presentation object validators from the Castle project along with the [DataBind] attribute.  It shouldn't be to hard to leverage the Castle project here, even while using a different controller base class.  I think they are quite complimentary, and Monorail has so many great features, I don't think I'll use the MVC Framework bare. 

Let me know in a comment if you are interested in me releasing the source for www.partywithpalermo.com


Published Mar 10 2008, 09:38 PM by Jeffrey Palermo
Filed under:

Comments

Jeffrey Palermo said:

@Peter,

In Monorail, with the DataBind attribute, you don't need to bind directly back into your business object.  Often your business object doesn't have all the setters necessary to pump values in from all the form fields or querystring values.  This is where your presentation model comes in.  You need an object specifically for the view that can be used with your web framework of choice in order to leverage some of the interesting features.  Your presentation object will have the appropriate setters.  It could possible be constructed by passing the business object into the constructor, and then the presentation object might only expose the necessary properties, not all of them

# March 11, 2008 8:13 AM

php code and scripts » Blog Archive » ASP.NET MVC Framework big changes since Dec CTP said:

Pingback from  php code and scripts  » Blog Archive   » ASP.NET MVC Framework big changes since Dec CTP

# March 16, 2008 10:08 PM

About Jeffrey Palermo

Jeffrey Palermo is a software management consultant and the CTO of Headspring Systems in Austin, TX. Jeffrey specializes in Agile coaching and helps companies double the productivity of software teams. Jeffrey is an MCSD.Net , Microsoft MVP, Certified Scrummaster, Austin .Net User Group leader, AgileAustin board member, INETA speaker, INETA Membership Mentor, Christian, husband, father, motorcyclist, Eagle Scout, U.S. Army Veteran, and Texas A&M University graduate. Check out Devlicio.us!

This Blog

Syndication

News

Headspring Systems

View Jeffrey Palermo's profile on LinkedIn

See my new blog at .jeffreypalermo.com