|
Before I start running down the bullet list, I feel as though I should point out that the ADO.NET Entity Framework and LINQ to Entities are still in CTP status - they are not beta, they are not RC, they are not released. There is still plenty of chance for the ADO.NET EF to radically change in ways that might affect the opinions and facts listed in this article. As such, this article is a comparison of how things stand on October 9th, 2006 :)
Overall, I have to admit that I was incredibly surprised by the power and flexibility of ActiveRecord. I came into this round thinking that ActiveRecord was going to be the clearly inferior product. As both products stand right now, ADOEF and ActiveRecord are both really good tools. I think the ADO.NET Entity Framework comes out ahead in many respects and the real winner is subjective. ADO.NET EF clearly favors configuration over convention because each entity model is actually three fairly large XML files that, without the visual designer, would be a huge pain in the butt to modify (note that I'm currently modifying them by hand during this CTP anyway...).
So - do you want the (in my opinion) extremely elegant syntax provided by LINQ to Entities, or do you want the somewhat more "SQLish" syntax of ActiveRecord filters? One comes with the (soon to be negated) overhead of 3 XML files while the other defines many of the definition shortcuts directly in the model .rb files - something many ORM purists dislike. There is a huge argument as to whether the model should define the mapping, or whether the mapping should be external to the model, leaving the model as a pure model... I often tend to lean toward the latter, thinking that the model should be just that - a pure model with no knowlege whatsoever of its entity persistence mechanism.
So, in conclusion, what I think I will be doing from now on is taking the lessons learned from writing Ruby on Rails applications and the patterns that it enforces so rigidly, and turn that into prescriptive guidance for building ASP.NET applications using the ADO.NET Entity Framework. ASP.NET is flexible enough that I can rip out large portions of it and replace the gutted remains with some very MVC-ish style application frameworks. The initial work of gutting and replacing might take more time than building a Ruby on Rails app, but once done, that new application building block can be reused over and over again. I think of it as the best of both worlds - the bent toward simplicity and the huge benefits of the MVC pattern exhibited by Ruby on Rails, with the enterprise features built into ASP.NET and the (slightly) more robust features of the ADO.NET Entity Framework.
Bottom line is you should pick whats best for you. Ruby on Rails solves a lot of problems more quickly and easily than ASP.NET does, whereas ASP.NET has a lot of features built in that you need additional gems and code generators for in Ruby. The real truth is that I see that Ruby on Rails and ASP.NET solve two different types of web application problems...and where they overlap, you can take Ruby design patterns and implement in them in ASP.NET for a "best of both worlds" approach.
Thank you for the series of three articles comparing ASP.NET and RoR. You
succeeded in concluding the same as I am beginning to conclude; that the
two languages / frameworks are really different animals. Unique tools in
our toolbox to be used as needed. With my experience rooted in web
languages of all sorts and, as a paid ASP.NET senior programmer, I am
actually led to believe that RoR is a better solution for a few reasons...
1) You said it yourself, RoR is "quick and easy" for most tasks, which is
extremely important in the web world. 2) To quote Spider Man's uncle, "with
great power comes great responsibility". And, from what I've seen from most
web developers, the power of ASP.NET is usually taken for granted and
usually out of ignorance of better alternatives. The same is true for all
programming languages, but the fact that RoR attempts to confine you to a
standard from the start certainly helps. 3) RoR is multi-platform and free.
This still scares most of corporate America into the comfort of buying
proprietary systems, which they then pay for again and again and again over
the years. As always, this isn't a complete list of pros and cons and there
are a great deal of arguable points in ASP.NET's favor. In my opinion and
experience alone, I am leaning toward RoR at this point. FYI: I am making
this decision having never actually programmed in Ruby and having 7+ years
of senior web experience using MS technologies. I have studied other
languages throughout my career and can usually take up a new one within a
week or two. My studies alone of the Ruby language and RoR framework have
led me to this conclusion. Although you never learn the quirks of a
language until you program in it for years, a language's abilities are
quickly apparent. I would actually choose .NET if I were simply judging the
programming language itself (C# preferably). But, "out-of-the-box" support
in RoR is currently superior. I'm always open to changing my mind should
someone have a convincing argument. :)