ASP.NET MVC + jQuery – can things get any better for web developers?
Hopefully this will attract some more talent back to the .NET platform. It’s been the case for a while now that the best, most passionate web developers — the ones who come up with the all-singing, all-dancing Ajax-y websites and eye candy — have generally been shunning the Microsoft stack in favour of PHP, Django and Ruby on Rails. You can easily understand why — the web forms postback model may be good for simple, fairly generic things, but if you really want to make your website sing, it has restrictions and leaky abstractions that get in the way a lot, such as the limitation of one server-side form per page, or the convoluted id attributes that it sticks in all over the place making CSS and DOM manipulation a major headache, or the monster that is view state.
However, with the ASP.NET MVC framework on the go, we have finally got back the control over our HTML that we need, and now with jQuery forming an official part of it, ASP.NET is becoming an even more exciting prospect again. It’s especially so since in many ways you can really push the boundaries with .NET a lot further than with most other frameworks. Languages such as PHP or Ruby are good in themselves, but they do have their limitations, and it’s not a good idea to try to use them for image manipulation, or genetic algorithms, or Bayesian spam filtering, for instance — they are just too slow for computationally intensive stuff such as that, and in those cases you would need to drop down to C++. On the other hand, in C#, you can do it all in one integrated end-to-end framework, and with Visual Studio, you have what is probably the best IDE on the market to help you on your way.
I’m looking forward to seeing a lot more all-singing, all-dancing websites written in ASP.NET.
I agree with you that JQuery is a breath of fresh air, and probably a smart move by the ASP.NET team.
I’m suspect of your theory that it will attract developers back to ASP.NET though. UI developers want elegant tools, and I think ASP feels too clunky. For example, all of that mucking about trying to figure out DOM IDs for controls. It’s just not a pleasant model to work with, for me anyway. Does the MVC system fix that?
Yes it does actually, and that was the point I was making. ASP.NET MVC works in the same way as Ruby on Rails or Django or any of the other MVC frameworks, giving you full control over your HTML. You can use some server controls with it (it’s only postbacks that you lose out on, so you couldn’t use it with controls that need to be rendered in a server-side form such as the GridView or the Calendar) and you can also have some parts of your website in MVC and some in traditional Web Forms if you’re that way inclined (Scott Hanselman has a good post on this.) The upshot of this is that with ASP.NET there’s pretty much an approach to cater for every taste. jQuery is just the icing on that particular cake.
Incidentally, the key to what I was saying is that I hope it will attract developers back to ASP.NET — unfortunately there are some characters out there who avoid it like the plague for no other reason than that it’s by Microsoft. Personally I think that’s a bit sad, because it really is a very capable framework and you can optimise it to go blazingly fast if you’re so inclined.
While I’m not sure if it will actively draw more developers in, I will say that it certainly makes the idea more palatable for traditional “hands on” web developers like myself. As you mentioned, and Scott Hanselman demonstrated, now there is room in ASP.NET land for virtually everyone.
Kudos to Microsoft for giving first class support to such an outstanding open source project as jQuery, I hope it is a sign of more to come.