Jeffrey Palermo (.com)

Sponsors

The Lounge

Wicked Cool Jobs

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
New drop of ASP.NET MVC Framework now available

My RSS feed:  http://feeds.feedburner.com/jeffreypalermo

You can download it here.  It's public and announced at the MIX conference.  A new release of the ASP.NET MVC Framework.  The license allows  you go "go live" and use it in production.  You'll have to uninstall the December CTP first.  The new install will only drop the assemblies in C:\Program Files\Microsoft ASP.NET MVC Preview 2\Assemblies, and then you'll have to copy them over to your application and drop them in the "bin" folder.

We'll be upgrading MvcContrib and CodeCampServer to work with the new bits soon.

From looking at the bits, here are some notable changes:

  • Constructor of Route now takes more information (GOOD)
  • There are IDictionary arguments for many things, and that is a GOOD thing.  Before anonymous types were required.
    I like the way Monorail handles this by allowing querystring syntax like: RedirectToAction("foo", new string[] {"orderid=" + theOrder.Id});
  • [ControllerAction] is gone.  Public methods are actions by default. (GOOD)
  • RenderView() methods are still protected and only 1 of them is virtual (would like IViewEngine to be used more explicitly)
  • 6 (SIX) members of the Controller class are still marked internal (I'd like to be able to extend them)
  • RouteValueDictionary is just a wrapper for the anonymous type.  (I think we can work towards a better API)
  • Seven properties don't have setters, such as IPrincipal User {get;} (I'd like to see setters)
  • I still see SEALED classes.  In an extensible framework, sealed is your enemy (I'll be making not of the sealed classes I'd like to extend)
  • ViewContext is not usable in unit test scenario because of its dependency on HttpContextBase. (It can be refactored to help testability)
    Still can't mock out the IViewEngine's RenderView method and have it work in a unit test.  I'm told the team is tackling this next.
  • ComponentController is a welcome addition to enable nested controllers, but, sadly, non of the members are virtual.
  • Lots of view helpers (GOOD)
  • Routing is a separate assembly (GOOD)
  • System.Web.Mvc.dll can be deployed in the bin instead of the GAC (GOOD)
  • We can go live with this drop (and it appears to me to be stable enough for small applications)
  • The team is committed to roughtly 6 weeks in between drops (GOOD).  Release early.  Release often.


Posted Wed, Mar 5 2008 1:12 PM by Jeffrey Palermo
Filed under: ,

[Advertisement]

Comments

Ben Scheirman wrote re: New drop of ASP.NET MVC Framework now available
on Wed, Mar 5 2008 3:20 PM

I'm surprised at all of the stuff we're seeing in MVCContrib & what MonoRail has that isn't even mentioned here!

Any change in TempData?  It had no setter before and depended deeply on HttpContext.  Would be nice to have it just implement IDictionary (with a setter) so that we could better test it.

DotNetKicks.com wrote New drop of ASP.NET MVC Framework now available
on Wed, Mar 5 2008 5:57 PM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Brian Sullivan wrote re: New drop of ASP.NET MVC Framework now available
on Wed, Mar 5 2008 6:14 PM

Somehow I'm not surprised that the ALT.NET community is disappointed in the new release.  I'm not trying to be uncivil, but will the ALT.NET community ever be satisfied with anything Microsoft does?  It continues to confuse me why a group of people who seem so unhappy with the Microsoft platform on continue to use it.  If there is something else out there that better meets your needs, why don't you use that?  Is it just that your employer requires you to use this platform?  It just seems counterproductive to me to maintain such a negative tone all the time.  Sure, encourage people to use good techniques and hone their craft, but I don't think continually bashing Microsoft for not providing everything you want accomplishes this.  Again, I don't want to make anybody mad, I would just like to understand your motivation and the reasoning behind your methods.

Dmitriy Nagirnyak wrote re: New drop of ASP.NET MVC Framework now available
on Wed, Mar 5 2008 6:56 PM

Brian,

I always agree it is not a good thing when people blame somebody/something for nothing.

But it *seems for me* that Jeffrey is right in many of his points. There are no radical changes.

I have just read the Release details of Preview 2 and see the things like "changed constructor parameters", or "added abstract class" etc etc.

This is not what I really expect from ASP.NET MVC.

I would expect to see changes like these: "Added Silverlight support to MVC", "Added nested SubViews support", "Added set of MVC Controls (grid, tree etc)".

I still can see that MonoRail is going to be much more mature and useful for at least a year or two.

Regards,

Dmitriy.

Sebastien Lambla wrote re: New drop of ASP.NET MVC Framework now available
on Wed, Mar 5 2008 8:28 PM

I still believe going the route of mapping routes to controllers is the wrong approach. Mapping routes to resource types, and mapping resource access to multiple controllers, and finally basing the rendering of resources to content-type specific views is the right way to go.

On the bright side, asp.net mvc not answering rest, conneg and resource-first design, it leaves plenty of space to do better with another framework. Maybe like one that runs on .net 2 :)

Jeffrey Palermo wrote re: New drop of ASP.NET MVC Framework now available
on Thu, Mar 6 2008 8:41 AM

@Brian,

I'm not sure how you infer that the _whole_ ALT.NET community is displeased with this framework.  I speak for myself and myself only.  Another point to note is that I am speaking at DevTeach and TechEd about the ASP.NET MVC Framework, and I'm writing "ASP.NET MVC in Action" with Manning.  If I hated the thing I wouldn't have anything to do with it.

The reason I bring these issues to light is because they are important, and I have a vested interested in seeing these issues resolved.  In the end, I would like to see this framework be very usable and not another albatross like MSTest.

Jeffrey Palermo wrote re: New drop of ASP.NET MVC Framework now available
on Thu, Mar 6 2008 8:43 AM

@Sebastian,

Even though the extensibility mechanism isn't ideal, you could provide what you are talking about.  I admit I don't fully understand your approach, but why not submit a patch to MvcContrib with that routing capability.  If it's better, folks will use it, and maybe Microsoft will include it.

Adam Tybor wrote re: New drop of ASP.NET MVC Framework now available
on Thu, Mar 6 2008 12:37 PM

@Brian,

I am disappointed.  A release like this, 3 months after preview 1 from an "agile" team with great talent.  Yes, I am very disappointed.  My excitement that MS could build a solid extensible framework is completely gone.  

> If there is something else out there that better meets your needs, why don't you use that?

Umm, yeah, hence the alt.net group, "alternative". We use things like Windsor, Structure Map, Monorail, NHibernate, log4net, lucene, boo, and custom DSL.  We get tired of fighting the MS frameworks, NOT the platform.  I love the CLR and C# 3.5.

Nermin's .Net wrote MVC Framework CTP 2
on Thu, Mar 6 2008 4:40 PM

MVC Framework CTP 2

Nermin Dibek wrote MVC Framework CTP 2
on Thu, Mar 6 2008 5:01 PM

Jeffrey Palermo has just announced that the second release of Microsoft's ASP.NET MVC Framework is

Matthew Podwysocki's Blog wrote ASP.NET Team Releases for Mix 2008
on Thu, Mar 6 2008 6:54 PM

For all those interested in the information and the latest bits from the ASP.NET Team, here are the latest

Reflective Perspective - Chris Alcock » The Morning Brew #48 wrote Reflective Perspective - Chris Alcock » The Morning Brew #48
on Fri, Mar 7 2008 2:49 AM

Pingback from  Reflective Perspective - Chris Alcock  » The Morning Brew #48

Scott Bellware wrote re: New drop of ASP.NET MVC Framework now available
on Sat, Mar 8 2008 12:10 AM

Brian,

The ALT.NET community isn't required to be satisfied with shoddy work, just as you don't have to be satisfied with criticisms of shoddy work.  I think that the issue here ia that you haven't gained insight into the engineering practices in play outside of the Microsoft sphere of influence and you likely don't have a frame of reference that helps you see why the work is lacking in software design know-how.

To understand the motivation and reasoning behind the methods, you gotta invest the time and effort to learn the principles and practices, otherwise there'll be little shared understanding to enable any kind of meaningful dialog.

Know thy dependencies and control them efficiently at Rinat Abdullin wrote Know thy dependencies and control them efficiently at Rinat Abdullin
on Sun, Mar 9 2008 9:50 AM

Pingback from  Know thy dependencies and control them efficiently at Rinat Abdullin

Tuna Toksoz wrote re: New drop of ASP.NET MVC Framework now available
on Sun, Mar 9 2008 10:08 AM

Another "STILL A PROBLEM" to me is Component Controllers cannot be set to come from a container. It still needs a parameterless constructor. I looked for somethnig like ControllerBuilder.Current.SetControllerFactory() for ComponentController but i had no luck,

Any Ideas on this?

Jeffrey Palermo [MVP] wrote This is how ASP.NET MVC controller actions should be unit tested
on Sun, Mar 9 2008 4:22 PM

I'm upgrading my partywithpalermo.com website for the MVP Summit party , and I'm retrofitting

Tuna Toksoz wrote re: New drop of ASP.NET MVC Framework now available
on Sun, Mar 9 2008 6:32 PM

Solved the issue by implementing classes like ComponentControllerBuilder and adding one more extension method to HtmlHelper making the componentcontroller created y componentcontrollerbuilder.

Eric Marthinsen wrote re: New drop of ASP.NET MVC Framework now available
on Mon, Mar 10 2008 5:22 PM

In fairness, I think the MS team is doing a good job with the MVC framework. Sure, it's not as far along as MonoRails or RoR, but it's still in its infancy, so that's to be expected.

Doing frequent releases (even if they are 3 months apart) and operating in relative transparency is something that must not have been easy. It goes against much of the established corporate culture. I can't think of another corporation that is doing this better.

I think the changes that were made in the most recent CTP probably represent more work than most people would imagine. In my experience, getting the framework right is what takes time. Getting the naming, inheritance heirarchies, and member visibility right takes a very long time. Once it is finalized and the ASP.NET team is comfortable with it, I think we'll see things like MVC controls, Silverlight support, etc. come pretty rapidly.

Scott Hanselman wrote re: New drop of ASP.NET MVC Framework now available
on Tue, Mar 11 2008 7:45 PM

It's early. I think the releases will come faster (maybe monthly) and you'll see progress.

SteveG wrote re: New drop of ASP.NET MVC Framework now available
on Fri, Mar 14 2008 8:27 PM

All the typical naysayers will come out, bash this, then go back to RoR's, etc...

This is all so much better than webforms, I would take it right now over webforms as is  :)

Wöchentliche Rundablage: ASP.NET MVC, Silverlight 2, LINQ… | Code-Inside Blog wrote Wöchentliche Rundablage: ASP.NET MVC, Silverlight 2, LINQ… | Code-Inside Blog
on Mon, Mar 17 2008 4:11 PM

Pingback from  Wöchentliche Rundablage: ASP.NET MVC, Silverlight 2, LINQ… | Code-Inside Blog

Devlicio.us