This a great framework, i've been using it for over a year now. It's been iteratively released (to public) 10 times, which is a new way for MS to develop, and they have really listened to the feedback from its users.
Visual Studio + asp.net mvc is a highly efficient dev. enviroment.
I agree. It's great because it's essentially Rails ported over to .NET. That's not a backhanded compliment. I think it was the right thing to do. I know there are a bunch of Rails skeptics out there, but as far as development practices go, they made solid decisions at every step. Coming from conventional ASP.NET over to ASP.NET MVC should be a breath of fresh air. No more having to program on a platform that tried (and IMHO failed) at making web development be more desktop-development-like.
I've already decided against doing ASP.NET development on my own projects, but if I were forced to use ASP.NET, I wouldn't think twice about choosing the MVC version over the conventional one. I had already begun introducing the Castle frameworks (inspired by Rails) into ASP.NET projects well before ASP.NET MVC was even announced, so I can't help but praise MS here.
I've worked almost exclusively as a webforms programmer for the last few years and transitioning to this over the last month has been surprisingly challenging for me. I'm definitely a newbie to the "real" web and I never knew how much of the web webforms actually hid from me.
Despite the difficulties, I've been encouraged by the flexibility of MVC and am thinking about making it my framework of choice for my coming projects.
IMO, the best bits of MVC are:
-Separation of concerns. No more mixing business logic with the presentation ("view") layer. I can swap out layers of my architecture more easily
-More control over page elements. I always found the ASP.NET controls a bit lacking...
-Leaner apps. I understand that this is mostly the developer's fault as there's always a way to do things better, but most of the apps I've seen written in webforms just feel bloated. There's too much cruft built into and around webforms to make it seem desktop-y
-Better support for TDD. I've not used this part of it yet, but the MVC model does lend itself to TDD much better than webforms.
I'm not saying that WebForms will be completely gone from my development cycle, though. It is still good for many things. I think the most glaring benefits are:
-Rapid development for internal/quickie apps. This may just be my experience and familiarity talking but it's very easy to throw up a quick and dirty app with webforms. Great for internal projects.
-Legacy applications. This benefit will fade over time, but I was hearing that there were problems with MVC on II6. Also, I don't believe it's supported on any version below II6.
Also the fact that the ASP.NET MVC framework is itself open sourced (the code is available on Codeplex).
I've been using this framework for a recent project at my day job and it's definitely a step in the right direction (i.e. toward design patterns common in other popular web development frameworks such as MVC, pluggable ORM system, use of third-party libraries such as jQuery, clear separation of concerns, and a strong focus on test driven devlopment).
Fundamentally, it's heavily inspired by Rails. Although it doesn't have an ORM, there are ActiveRecord clones available for .NET anyway. The components that resemble Rails resemble it a lot. ASP.NET MVC was not meant to recreate the entire Rails environment and tool chain. So it does not have things like database migrations, automated deployment scripts, etc. built in. These things are provided by third-parties however.
I wouldn't choose ASP.NET over some other open source framework because of this MVC framework. But it would make ASP.NET development a lot less aggravating if I were forced to do development on ASP.NET.
I've dabbled with Rails and Django, but not extensively so I'm not in a position to give a detailed comparison.
The features of ASP.NET MVC as listed "on the box", as it were, sound similar to those in frameworks like Rails and Django. Since the MVC framework is open sourced, I suppose there is nothing stopping somebody from verifying the quality of Microsoft's implementation.
However, this new ASP.NET MVC framework comes out far ahead of the standard ASP.NET WinForms system, whose PageView model was certainly not comparable to frameworks like Rails.
Could you elaborate on that? I have never used ASP.NET. The ASP.NET WinForms model sounds good in theory. It's a little bit like Seaside: you have components on the page that have callbacks, etc. Yes, it isn't like the web, but I imagine it could work for web applications. Why is WinForms bad?
The WinForms model for web development is absolutely atrocious. It has an event model that only makes sense on the desktop. To get this event model working on the web, they literally shoe-horned a size 6 stiletto onto a size 12 male foot. They invented all sorts of hacks like viewstate just to get this event model to work. And in the end, it does not buy the developer anything other than lots of confusion when they initially begin working with the framework over the order of events.
Seriously, if you've ever been to some beginner/intermediate MS conference lectures, they need to cover topics that no other web developer needs to even worry about, like how to keep your viewstate nice and trim, how to ensure that your web app works across a cluster and doesn't cough because the viewstate was generated on one server and consumed by another one (http://msdn.microsoft.com/en-us/library/ms998288.aspx), etc..
It's a terrible terrible terrible monstrosity that should only be interesting in the academic sense of "I wonder if it's possible to do that" kind of way.
Awesome framework. All the quirkiness of ASP.NET is abstracted away from you (though you can still get to it if you need to). As a Rails developer you'll feel right at home with controllers, views, routing, and tests.
The annoyances:
- ActiveRecord has its downsides but it's easy to use and ASP.NET MVC doesn't come with a similar ORM. LINQ is awkward to learn.
Linq is freaking sweet. I miss it every weekday I have to write C# 2.0 and every weekend I write Python. Anyone interested in pragmatic programming languages owe it to themselves to learn a bit about Linq and why it is so pleasant to use.
The best way to learn Linq is with the 101 samples [1], but I might be bias because my friend wrote them [2].
I haven't used Python since 2004, and never became an expert. But isn't is possible to achieve most of what LINQ does in Python? I know in Ruby it's possible to call sort with a block (http://snippets.dzone.com/posts/show/2120). IMHO, that code resembles the spirit of LINQ. That's without even touching on the ActiveRecord portion of Rails which achieves a lot of what LINQ does too. There's got to be a way to do this sort of thing in Python too, even if it requires a third-party library.
UPDATE: Here's a better example for Ruby syntax compared to LINQ.
Python's generator expressions let you get the common 90% of what you would do with Linq. Generator expressions, however, quickly become awkward when nested and don't really support joining or grouping data. Python has a groupby method and similar helpers, but they simply aren't as natural as the SQL-style syntax. Also, Linq puts the object being queried first to make it toolable (IntelliSense can offer completion for members in where and select clauses, etc).
I don't know much Ruby, but I'd suspect that blocks can simulate Linq far better than Python can. However, the Lambda-inspired syntax is a bit cluttered when compared to the SQL-inspired syntax.
Linq is a feature about 3 things:
1) Correctness via static typing checks
2) Interoperability of various data backends (Microsoft provides backends for XML, SQL, and .NET objects)
3) Clean and beautiful code
Neither Python nor Ruby can provide #1 (at compile time, anyway). SqlAlchemy and other projects attempt #2, but I don't have enough experience with them to comment on their success. And while Python as a whole (and I presume Ruby) has lots of #3, complex data querying is not the most beautiful experience.
LINQ I found is not that awkward to learn. It's a feature of C# and .net not just of asp.net MVC, so it's a transferable skill, and an important skill for .Net programming in general.
Try the ADO.NET Entity Framework, Microsoft's new LINQ-based ORM tool, released with Visual Studio 2008 SP1. It's very easy to use, and plays well with ASP.NET MVC.
Big win for Microsoft. Though I'm skeptical about whether the VB focused ASP.net dev community will adopt this over the fundamentally broken "WebForm" piece (Microsoft hasn't taken any official position over which one is prefered).
Still, I've gone through this and its very well architected. Not going to get me to switch back to ASP.NET from Rails/Merb, but its nice to know that some people at Microsoft finally understand how to build a well built web development framework.
I'm having a hard time getting excited about this. In 3 months MS will release version 1.1 and then version 2 coming 6 months after, each with version compatibility issues with the release before. Then a new flavor of the month will catch MS's attention and this will finally stabilize to the point where it can be implemented or identified as junk technology.
Maybe, but it is open source and was developed with constant feedback from the developer community so that indicates something of a new direction on the part of MS.
Visual Studio + asp.net mvc is a highly efficient dev. enviroment.