This post originated from an RSS feed registered with Ruby Buzz
by Daniel Berger.
Original Post: Rails vs ASP .NET - a very incomplete comparison
Feed Title: Testing 1,2,3...
Feed URL: http://djberg96.livejournal.com/data/rss
Feed Description: A blog on Ruby and other stuff.
Someone asked me to blog about my experiences with Ruby on Rails vs ASP .NET. My notes are limited, as I never completed the book I was self-training from, but I thought I would at least share what I had. BTW, the book I used was "Beginning ASP.NET 3.5 in C# and VB". I was using C# for development. Some points may be technically inaccurate. I'm just going with what (limited) knowledge I had before I resigned.
I'll start with the conclusion - I prefer Rails. Actually, I'd probably prefer any dynamic language framework (Django, Catalyst) to ASP .NET. Ok, on to the comparisons.
Let's start with the obvious. ASP .NET immediately ties you to the MS Windows toolchain, meaning you're going to need Visual Studio and develop solely on MS Windows. RoR can be developed and deployed on any platform.
Next, ASP.NET doesn't have an ORM layer. That's right, no models. You can find C# ORM's online, but they aren't part of the official toolchain, which means you might have difficulty getting them accepted at your workplace if you're in a corporate environment. The upshot of not having models is that validations must be handled as separate controls, embedded in the view no less, that are then attached to other controls. Not only is this clumsy, the validations are limited. If I need to write a custom validation method, I have to write it in Javascript if I want to use a client side validation. Blech.
Also, because there's no model layer in ASP.NET, you must distinguish between server side and client side validations. Rails doesn't require you to make this distinction because all validations are handled by the model, and all database changes are handled via model objects.
I never got around to LINQ, btw, so I'm now sure how that changes things.
Another thing that irritated me was that I had to recompile the project if I want to make a change. As the project grew, doing something as simple as changing an object's id becomes a cpu and time consuming operation as it scanned the rest of the project to ensure there weren't any conflicts and did some automatic renaming. I dread to think how nasty this could get on large projects.
On the whole ASP .NET programming felt very little like programming, and very much like button pushing. Huge swaths of code are autogenerated for you, and I spent most of my time in properties dialogs, rather than writing any real C# code.