ASP.NET MVC 1.0 Released
haacked.com
haacked.com
Visual Studio + asp.net mvc is a highly efficient dev. enviroment.
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.
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.
MVC is a really big step forward, something that most people didn't expect from MS (meaning the inclusion of third party stuff).
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).
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?
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.
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.
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.
- It doesn't have view partials.
The best way to learn Linq is with the 101 samples [1], but I might be bias because my friend wrote them [2].
[1] http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx
[2] http://www.microspotting.com/2007/12/anders-hejlsberg-intern
UPDATE: Here's a better example for Ruby syntax compared to LINQ.
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.
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.