Does the ASP.Net MVC Framework Frustrate You?
Silverlight, ASP.Net Ajax, LINQ, Astoria, ASP.Net MVC – there’s just tons of stuff coming out of Microsoft. And that’s not to mention the stuff people have seemingly forgotten about – ASP.Net Futures with IronPython (AWOL), Patterns and Practices Web Client Software Factory, WPF, WF, WCF and CardSpaces. Now the trend seems to be functional programming languages, especially with F#.
There’s just a bit too much for me.
What I really need is guidance. My customers don’t ask me what to they should use in 6 months; they ask me how to use what already exists. They don’t want “cool”; they want stability and consistency. And while the ball keeps moving, we can’t grab it.
Take for example, the ASP.Net Futures framework. I recently took over a project where it had been used. I checked to see what was available now – nothing! It seems to be dead. I’ll have to rip it out of the project, somehow. Major headache!
MSDN Patterns and Practices have produced some great stuff recently. Policy Injection, ObjectBuilder, PageFlows, Validators; but it’s completely ignored, as no one has a chance to look at it because of all the other stuff grabbing their attention. Well that, and the fact that it looks a bit overengineered.
While this is happening, and the cool guys are playing with all the new stuff, the guys on the ground are wondering what they should learn and what not. LINQ is hard enough to learn, and most developers haven’t even looked at the near 18-month-old WF suite yet. There just isn’t time.
I recently heard Dino Esposito say the same thing. I heard him on DotNetRocks bemoaning the fact that Microsoft seems to have abandoned ASP.Net Ajax to chase after Silverlight. They could have made ASP.Net Ajax absolutely fantastic, but aren’t doing anything about it any more. Seems like it’s finished.
But above it all, the MVC Framework just tips the scale for me.
Let me start with some history. About 18 months ago, I heard Scott Hanselman say in his podcast that Ruby On Rails was the framework that Scott Guthrie and Microsoft should be worried about. I agreed. In fact, I went and learnt Rails because of that. I found it was really good, just like he said (apart from when you try to get a site deployed, at which point you need a degree in Rocket Science or a great hosting company. I had neither.) But the concepts I learnt from Rails were very interesting. I tried to apply them in my work.
Enter SubSonic. Rob Conery made a great implementation of the ActiveRecord pattern from Rails for .Net and called it SubSonic. He even included some of the syntactic sugar that makes Rails fun. It is a great framework, and I suggested to some customers that they use it. They tried. They failed. I asked them why, and they answered that it just didn’t go far enough. They went back to using DataAdapters.
Rob and Scott both work for Scott Guthrie now. They seemingly focus on the ASP.Net MVC Framework, which, unsurprisingly, is a blatant attempt at a copy of Rails.
Whether or not it’s a good framework (and I think it is), the problem is, I need some features for the stuff I’ve already got. I might need Routes (ala Rails) for my ASP.Net apps; I don’t need a complete new system for building pages. It just took me 3 years to learn ASP.Net as it is now. I don’t want to throw it all away because it’s not cool any more. And I don’t think my customers want to do that neither.
Why not make ASP.Net better? Why not take the stuff in Patterns and Practices and make it simpler to understand. That’s what happened with C-Omega and C#3.0. The good stuff from a research project found its way into the next version of the more popular language. Thumbs up to Anders!
I think that Microsoft could actually do a much better job at Rails than DHH did. Sure, he gave them a kick in the butt, but that’s a good thing.
Rails has things in it which we don’t need in ASP.Net. Multiple views are often necessary for creating REST API’s – how often do ASP.Net developers do that? If we do, we have business objects and other ways to support an API. Routes using controllers is for nice-looking URLs, especially useful for search engines – how many pages of our sites do most ASP.Net developers want to post to search engines? MVC is to make it simpler to control what goes into markup, and what goes into a view – we already have MVP, which fits well in ASP.Net, and doesn’t lead to huge controller files. (What’s a controller anyhow?)
And don’t forget that Rails doesn’t have the concepts of security built in. It doesn’t have controls. Try integrating plugins – it’s not always easy. And despite the TextMate craze, the IDE is pitiful. You have to know Ruby well before you can do anything.
On the ASP.Net side, do we really want to kick out viewstate? It was put there for a purpose. Real-world website developers were having trouble managing the control of forms in ASP, and ViewState was a good answer. Rails doesn’t have that. It does everything with IDs in forms. Cool, but if it’s put into ASP.Net MVC, it means we’ll have to learn a completely new model to achieve the same purpose.
The real reason I’m peed off, is that I’m having to invent my own guidance, while MS seems to be messing about doing other things. That’s not good for the customers, as they get new ideas from everyone, and no idea what is right or wrong.
So guys, please. Why not stop what we’re doing, take a step back, consolidate, learn from each other, and build something better than ever.
about 2 years ago
I think you have some very valid points, and I’ll write up a post to answer some of your concerns. I would however push back a bit in calling ASP.NET MVC a blatant copy of Rails. MVC is almost 30 years old as a concept and P&P had an MVP imp before Rails existed, not to mention Monorail was around for a long time. To be clear, you h have many valid points, I’m just saying not everything is a copy or rip off of Rails.
I will help get you the guidance you’re asking for.
about 2 years ago
Richard, I totally get where you’re coming from. I think the idea is to allow devs more choice in how we build web apps. I also believe that tools like the MVC Tolkit and MVC Contrib will provide additional tools to make working with MVC more RAD.
Besides, Scott’s gonna’ make everything okay.
++Alan
about 2 years ago
Hello. New kid on the block here.
To be honest, I don’t really think the ASP.Net MVC Framework (MVC.Net?) is targeted at existing, longtime, hardcore ASP.Net developers. It’s definitely going to have pull with the “in-crowd” currently tinkering with Rails, JBoss Seam and MonoRail, though.
We’re working on many different Monorail projects at work, and we keep looking sideways to whatever ASP.Net MVC “is up to” currently, but have found it to be a bit lacking still. With some time, I’m sure we’re going to make the switch.
about 2 years ago
Awesome write-up, Richard. I think you echo the sentiments of a lot of people out there. There is so much excitement about what is coming out Redmond these days, but the pace is relentless and exhaustive to keep-up with. A few weeks back (around the time Volta was released at MS Live Labs) I just yelled “enough!”.
Ok, I have an amazing set of tools from MS right now; I am just going to focus on mastering what I have without adding anything new for bit. I feel like a contestant of that “Supermaket Sweeps” game-show. Rushing down the aisles shoving as much technology into a basket as I can in the allotted time.
I love MVC as pattern and I think it’s great for clean development livin’ I just hope that it doesn’t become a casualty of Microsoft new technology fatigue.
about 2 years ago
Scott,
I’m not meaning to put the MVC framework down in any way. There’s definitely some great work being done there. You must admit though, the Routing, the RenderView methods, etc, etc, all are extremely similar to Rails.
In itself, that’s not such a bad thing. My only question is can we relieve the pain of ASP.Net as it is now, without having to resort to something completely new.
Richard
about 2 years ago
Richard,
Totally, I agree that there is lots of Rails-like stuff in there, just as Rails looks like classic Model2. I was calling RenderView and Routing stuff in Java at Nike like ten years ago. I don’t say that to be flippant or defensive (it’s hard to tell “tone” in text) I say it in a matter-of-fact way. MVC concepts are not new and they can only be done so many ways. You know?
about 2 years ago
Scott,
Okay. I stand corrected.
about 2 years ago
+1 Totally agree, those people at Redmond are killing me.
about 1 year ago
I am with you Richard and feel a bit overwhelming too! But guys like Scott and Rob are undoubtedly tickled pink by the MVC and “Ruby on Rails”.
Anyhow, after watching this video some time ago (now missing in action):
http://subsonic.wekeroad.com/view/all-about-rails.asp
by Rob I was convinced that the MVC is the future.
Nevertheless, I am not sure why Scott downplayed the MVC at the MIX08 saying something like, “99% of you probably won’t be interested in this.” But shouldn’t we be?
Lastly, maybe we should have become history teachers. I think it would have been a lot easier, although a lot less fun.
Oh well!
about 1 year ago
I agree fully agree with this post. Why does Microsoft have to rip stuff off? Look at this post on Mr. Lam’s blog:
http://www.iunknown.com/2008/06/ironruby-and-aspnet-mvc.html
Come on man!! Microsoft is just feeding DHH’s master plan. If just 10% of guys who never heard of Rails discover it was the basis of ASP.NET MVC and they fall in love with Ruby, you have just asked them to jump over to the Mac loving Microsoft hating world. That’s what happened to me…and its only a matter of time until I break free of the 800 pound gorilla.
That code is almost identical to Rails code…with only minor differences. Microsoft is a ten headed dragon with each head trying to move the body in a different directions. You know what would be better? Dump Windows…dump it and build an OS from the ground up that can kick OS X’s ass. Spin off companies for SharePoint and all the other shit and let them survive or die in the marketplace. Until you do something smart, I’m going to talk shit about you on a daily basis….and I work in Redmond…but thankfully not for Microsoft.
about 1 year ago
Yes it’s this overwhelming deluge of “new” technology that is urging me out of a hands-on role and into something more managerial.
about 1 year ago
Hi, this seems to be an old post but as a someone who looked at the latest (9th Feb 2009) release (and unless I missed something major?!) I’m inclined to agree with your most of your comments Richard.
My MVC experience came from requirements such as a) everything must be expressed in XML b) from customers who were always providing ‘changes’ c) it must run (maybe) on both web and winform. Hence I chose the UIP from P&P. Okay it was messy (maybe due to some design pattern choices I made OUTSIDE UIP) but on the whole it worked (I didn’t worry too much about screen/state flow too much).
Now, I expected a posh(er) version of UIP that allowed be to use my (and my customers) WebForms investiment including all the AJAX stuff. I also like the XML definition as I could generate some cool looking graphs to validate the requirements IN PICTURES (as well as allowing the ‘just configuaration changes’ the salesman promised to our customers).
The MS MVC appears to do away with this and put all the navigation/state tranistion stuff in compiled code. I could cope with that if I didn’t then have to junk all the AJAX stuff we’ve invested in (GridView editing hacks and add-ons etc.). as well as stuff like watermark textboxes etc. Yep, I could re-code these but the point is I don’t want to and nor does my customer wish to pay me to do so. So what do I do (look around for a more grown up UIP so I may answer my own question)?
about 1 year ago
Hi Paul,
Yes, it is a bit of an old post, but I don’t really see any big changes in the MVC framework. And as you point out, I really don’t see any advantages to using it for most ASP.Net developers.
I must admit, I haven’t used the ASP.Net MVC bits for a while, but I did have a look at the source code repository on codeplex recently. Despite Scott Hanselman’s statement to the contrary (see the comments above), it really does seem to be a poor implementation of Rails. Granted, the MVC model has been around a long time, but all the other stuff in Rails hasn’t, and they’ve obviously tried to copy it.
As you suggest, I do not see why they didn’t take the bull by the horns, communicate with P&P, and try to create a new framework which makes it quicker to develop and easier to test with WebForms than it has been so far.
I too have my own implementation of MVP, copied and simplified from P&P. It turns out to be a nice model. If they had put the same investment into building nice tools to support that model in Visual Studio, people would have been just as happy, and actually started to use it. Now there is a completely new model, and our customers won’t pay us to use it.
Thanks for your comment. Much appreciated, and very interesting to know how people see the MVC stuff at this late stage.