DevConnections - The ASP.NET MVC Framework
The work on the ASP.NET MVC Framework continues.
Phil's been playing with RhinoMocks writing tests for his MVC Samples, and Chris Tavares has his samples using Castle Windsor running as his Inversion of Control Container.
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.
Here's a link to Eilon and my slides from DevConnections. If you don't have Office 2007, grab the Compatibility Pack for Office XP, 2000 or 2003 and you'll be able to open them. I'll record a screencast of the talk perhaps next week. There should be some public bits to play with in December sometime.
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.
Also, as a reminder, don't forget to come by the Nerd Dinner tonight at 6:30pm! Here's some links to help you remember and add this to your calendar:
- Via the new Live Events:
- Facebook Event
Enjoy!
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.
About Newsletter
Nice...
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
When is expected to be released in CTP?
The line: SOAP is for Dorks just sticks in my brain. I thought that was funny.
Hanselminutes Fan,
Catto
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.
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"?
(Mega Hanselminutes Fan)
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.
> (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?
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.
Comments are closed.