Eilon Lipton, the primary developer on the MVC project, and I presented at DevConnections yesterday. In fact, he and I did three presentations together in one day, which may have been a mistake. ;)

Anyway, I think Eilon and I worked pretty well as a team on stage. We wanted to get the point across. What's the point? This is not Web Forms 4.0.

I used the example of a Car vs. a Motorcycle. Both are two ways to get from Point A to Point B with their own advantages and drawbacks. The inclusion of this framework within System.Web is about offering alternatives. It will be a fully supported, fundamental part of the System.Web and isn't going anywhere.

It's also very extensible. We showed demos with Castle Windsor, RhinoMocks, as well as crazier samples like the DLR under MVC and running XML-RPC over MVC to try out an idea that Phil and I could get Windows Live Writer talking to MVC ala REST.

One important point I kept stressing in the talk was that this is designed to be compatible with the ASP.NET subsystems you already use. That means Session, Cache, Personalization, Roles, Membership, etc, still work and are there to be used and abused. This framework, in the namespace System.Web.Mvc, is an alternate architecture, but not "an entirely new parallel ASP.NET," no more than any of the other home-grown or open source MVC/MVP frameworks that are out there.

I'm going to give a very similar presentation at the PNP Summit today at 8:30am. ScottGu has had to cancel his keynote at the PNP Summit, so my MVC Framework talk will replace that. I'll also be presenting on Friday at 8:30am (the "ending" keynote) on "Community: my first 8 weeks inside the Big Blue Monster" so more on that talk soon.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

Great presentation. Can you post the source code from the demo? I'll understand if it's missing the MVC dependancy.

Josh

Thursday, November 08, 2007 2:20:14 PM UTC

As a former J2EE developer who used the Struts-Tiles framework for extending the MVC Model2 architecture, I am excited to implement this framework. When I first transitioned to ASP.NET not too long ago, the current architecture (what's the pattern it represents anyway?) was one of the pain points. I really look forward to reviewing your slides and getting my head around this.

Thanks, again, to you and Eilon's work on this presentation as well as to the rest of the ASP.NET team's continued drive to refine!

- Nate

Nate

Thursday, November 08, 2007 3:06:50 PM UTC

It would be nice to have screencast of this presentation.... and/or some code...When is expected to be released in CTP?

This may not be the best place for it, but I've been meaning to weigh in on this, so lucky you, Scott, here are my rambling thoughts:

Having come from the Java world and also written a couple of Rails apps and having played with Monorail, I've had a lot experience with MVC and I'd say it's usually neither a motorcycle nor a convertible. It's a bicycle. It's nowhere near as sophisticated as WebForms. Granted, many web apps are simple ones, but it's worth noting that MVC frameworks generally don't offer the richness of the component-based ones. Still, most of them aren't as buggy as the component-based ones, either). I could write an MVC framework over a weekend. I don't think I would ever try to write a WebForms, and that's both a complement and an insult to WebForms.

Funny that the MS world is moving in the opposite direction as the java world, which after producing many MVC frameworks has spent the past few years moving towards a component-tree approach comparable to WebForms. Java ServerFaces is still controversial, but it's also nowhere near as solid as WebForms. In many ways WebForms is very very impressive. Unfortunately it sucks at a lot of stuff too.

It seems to me that most MVC's strengths are in binding, pipelines, routing, dependency injection, open source-dness, and testability. Coincidentally, WebForms sucks at all these things. MVC is a good, simple alternative. Definitely more accessible to new developers, lowering the barrier to entry. But personally, I would really rather see WebForms fixed to improve the things I just mentioned (start by looking at JSF - it did get a few things right, like dependency injection and command objects). WebControls and ViewState are very useful concepts, but many of the WebControls themselves are just poorly designed (trying a little too hard, and failing, to be simple for Mort) and nearly impossible for an outside assembly to fix. DropDownList, for example, is horrible, but it could be improved.

It also seems to me that the MVC approach to making an app "testable" (specifically, testable outside the web container), means that you essentially write off the View part as untestable, which means you make the View as dumb as possible and write a LOT of code that, for any rich UI, may end up being very UI-centric. Call me a dreamer, but I'd rather have a View / UI layer that is both rich and testable.

I don't get why it needs to be either/or.

Winston Fassett

Thursday, November 08, 2007 11:55:06 PM UTC

"Lemme ask The Gu if we can give away the apps without the refrences."

W000000t, I'd love to see the demo code, though an actual CTP/Beta would be that little bit awesomer (is that a word?). Also, does your new nickname for ScottGu mean you're "The Ha"?

I believe that rich web interfaces will be constructed on the client. Just make sure you have a unordered list in your HTML and use something like Ext to create a tree out of it. No need for the ASP.NET TreeView, in fact, using Ext you can do so much more in the tree, like drag and drop.

Mike

Friday, November 09, 2007 11:10:44 AM UTC

-- Winston Fassett> (MVC is) accessible to new developers, lowering the barrier to entry. > (The praise of web forms interspersed throughout the post)

Two major reasons why web forms have failed are:- The people who conceived and perpetrated web forms had had no experience of web development.- The people who conceived and perpetrated web forms had been hell-bent on making web development easy and simple for the masses of VB6 programmers and future enthusiastic newcomers.

The only comfort I find in the news about the MVC Framework is that, this time around, Microsoft seems to have engaged experienced people, e.g. Phil Haack.

I fear Microsoft is aiming to release a polished or semi-polished product that may not turn out to be great, but it will so late in the production cycle that Microsoft will be reluctant to reverse gears.

Microsoft has made the source code of AspNet visible. It shouldn't be afraid of making the MVC Framework's code and development process visible so that we may comment early.

Why not have daily or weekly builds?

texasBelle

Saturday, November 10, 2007 2:43:48 AM UTC

I loved the presentation. I thought you and Eilon played very well off of each other, and definitely left wanting a part 2 of MVC instead of Part 3 of ASP.NET. :D

@Mike - I see your point. But my choice of the word "rich" may have been confusing. I meant that component-frameworks can produce a richer server-side product. For example, component frameworks can have, um, components. UserControls, for example, are very useful, and any MVC analog would pale in comparison, usually just amounting to "includes" in the view. While many MVCs have configurable "pipelines" and dependency injection, I have never seen one that allowed you to assemble larger components out of smaller ones (and that's still useful even if you are composing your UI out of JS components). With MVC, you are basically giving that up, IMO.

I do agree that MVC / REST is currently better suited to stuff like Ext TreeViews, but I believe that it's partly because WebForms has always had an uneasy relationship with state, coupled with a fairly inflexible lifecycle. I'm optimistic that it could be done, but I do agree with (what I believe to be) your comments on Is Microsoft Committe to AJAX? that no one is doing it.

@texasBelle -

- "perpetrated"? Seriously? Like WebForms was some horrible crime? - I cannot believe that the people behind WebForms had "no experience of web development". That's a ridiculous assertion.- I do agree with your second point, but I think that has begun to change. Everyone needs to accept that component-oriented web frameworks are complicated and will require not only a solid understanding of the web idiom, but often also an understanding of the inner-workings of the framework and controls themselves. Most of the documentation I've seen glosses over how things actually work, with only occasional scattered blog posts illuminating dark corners, so I've had to use reflector a LOT in order to understand what's going on.

This is where I agree that open-sourcedness and transparency is key, even for Microsoft.