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.
@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
I initially chose MonoRail over MS WebEx because of the [DataBind] attribute. After a while though I decided that I didn’t like the UI having direct access to my business objects.
For example, the site I am writing will have someone else design the views. If I expose Employee what is to stop him from adding $Employee.Salary, $Employee.TelephoneNumber, or whatever he likes?
In addition to this I found that the view data being posted back doesn’t always map directly to a business object. I am finding it much better in MS WebEx to use LINQ to create lists of anonymous objects etc to feed my ViewData, and straight forward value types for getting data back and then deciding how it should affect my business objects.