On the ALT.Net MVC Movie
Before watching the show:
- It is great that we are finally seeing signs of changes
- Technologically, doesn't sound much different than MonoRail
- Politically, great news
- Not sure why everyone is raving about the routing support
During:
- Things I haven't heard in Microsoft talk so far:
- Unit Testing
- Mocking
- Not using the designer
- Separation of Concerns
- Maintainable by default
- My stuff that are being mentioned:
- Brail
- Rhino Mocks
- Leaving holes for the community to plug.
- Great things that shouldn't have caused excitement:
- Clean URL
- Clean HTML
- Not using post backs
- It shows some nice possibilities of C# 3.0, I think that this is showing some new API styles that we can use in C# 3.0
- Things that are complete surprise:
- Getting a test project that support NUnit, MbUnit, etc
- Key phrases:
- Not forced
- Mockable
- Testable
- We should look into it
- IHttpRequest, sweet!
- There was a lot of time spent on routing
- A moment of bliss:
- "If you know MonoRail, it is the logical equivalent to layout" - I had to say the reverse too often
- Server controls for this framework are just renderers. This means that I can plug them into MonoRail.
After:
- I need to do more C# 3.0 stuff, I actually installed Beta 2 while I watched the movie.
- Routing is nice, and I like the idea of having is centralized, but I still can't figure out why is was such a big thing.
Summary:
The MVC framework is fairly standard, there was another one a short while ago, ProMesh.NET, which much of the same capabilities. That was not the important part of the presentation as far as I am concerned. The important part was (a) awareness and (b) willingness to cooperate with the community. And that was the best news I had from Microsoft in a long while.
Comments
I think you meant "IHttpRequest, sweet", unless interfaces for the intrinsic asp.net objects make you sweat :)
Regarding the routing support, I don't find it all that absolutely required, but I guess the big thing about it is having the helper classes (Html.Link?, redirects, etc.) be able to generate relative urls based on the routing information without having to hardcode your url structure into the code creating the link,
The latter is something which does happen in monorail (or at least to me) because a lot of the monorail code assumes the standard area/controller/action pattern and the helper methods are a bit cumbersome if you need to pass arguments other than "id=".
On the other hand, I'm not sure what the whole excitement about being able to "change your URL structure" is about.... sure, it's nice being able to choose your own URL structure, but it's not like you're going to be changing it all that often (or at least I've never found myself in that situation).
Thanks, fixed.
The main problem I have with the focus on the routing support is that it is so... out of the way. It seems like the way to differentiate it from the rest of the MVC frameworks, but this is something that can easily be done.
I wonder if routing got talked about so much because it came first major topic.
That is what I do anyway. Start slow and relaxed, going into loads of details, then realise I am about out of time and have to cram the other 70% that is not necessarily more or less important into the last 5 minutes.
@Ayende,
Oh, yeah, absolutely. I'll wait till I actually get my hands on it to see how useful it actually is, cause at first glance, I had a similar impression: seemed a bit over the top.
and where is the movie??
Check Hanselman's blog
The routing support is bi-directional, I think. MR doesn't support that right now AFAIK, in that routing information isn't used by the url builder.
Also, the use of C# 3.0 in the demo added a little bit of sugar on top. I think some are getting confused between the MS MVC and C# 3.0 features.
The routing support is bi-directional, I think. MR doesn't support that right now AFAIK, in that routing information isn't used by the url builder.
Also, the use of C# 3.0 in the demo added a little bit of sugar on top. I think some are getting confused between the MS MVC and C# 3.0 features.
Colin,
No argument that this is nice to have it bidi, but that is not a main line feature in my opinion.
And yes, the C# 3.0 stuff are really nice, so I think that has gotten mixed as well
A big reason I got excited about routing is that MS seems to finally understand that magic strings are bad. (Allowing strongly typed ViewData is another example of this.) Now, we'll see if this cleanness stays once we get our hands dirty. The Monorail folks at the conference mentioned that MS's MVC framework looks nicer than MR, especially with testing, which seemed like a good sign to me. (I haven't used MR, although I tried to install it about a year ago.)
(Strictly speaking, magic strings work OK in fully tested code bases, but I don't like them and if they can be done away with cleanly, I'm all for it. Also, the use of anonymous types in the new URL-creation API is effectively use of magic strings, as the anonymous type is really just being used as a literal hash. The only way to [partially] verify that hash is to run the API and ensure an exception is not thrown.)
Comment preview