12 Reasons I Use Rails instead of .NET 22
I recently got an email from someone asking for a quick list of features that, in my opinion, make Rails great. I thought I'd copy and paste my answer here.
I actually get this question quite a bit, so you'd think by now I'd have a brilliant, prepared answer... but I don't. :-)
So here's my lame answer that I'm rattling off the top of my head - of course these are just my opinions, and I'm not implying that other frameworks don't have similar great features; but these are simply the top features of Rails that come to mind.
- Ruby. The language is just awesome for object-oriented development. Remember, I was a longtime C++ developer, and C# after that, so I've always loved statically-typed OO languages. But I usually get more done with Ruby in less time.
- ActiveRecord. The easiest ORM I've ever used (again, it's mainly because of Ruby's language features that make this possible)
- Forced MVC design. There are other great architectures for the web, but for database-backed apps, MVC is fine 80% of the time; so for that sweetspot, Rails makes it easy.
- TDD support. To call it "support" is to understate it. Rails expects TDD, and so it's a first-class citizen in the application skeleton. The best Rails developers I know all use TDD. It's the only framework I know that doesn't just "allow" you to do TDD, it assumes you ARE doing TDD, and makes it easy to do so.
- Ajax support out of the box. And in a clean way that again leverages Ruby to its fullest. There's almost no mental context switch between writing Ajax and non-Ajax code - it's all Ruby, same idioms, same "feel" of where your code should go.
- Agile development baked in. Like TDD, everything about a Rails app skeleton screams for best practices, and it goes out of its way to induce you to keep your code DRY, refactor often (this is why the TDD aspect is so important), and build incrementally.
- Limited choices coerce you into following Rails' best practices. Some people call it the "opinionated" side of Rails. I call it standing on the shoulders of giants who've already figured out good ways to stitch together the various tiers of a web app. The REST support in Rails is a great example of how average developers become good developers if they follow Rails opinion on how you should think about your application.
- Database agnosticism. There's built-in support for, I don't know, about eight popular databases, and it's almost 100% transparent.
- OS agnosticism. I develop Rails sites on Windows as easily as I do an a Mac or Linux (ok, I sort of take that back; the tool support isn't quite there on Windows, and the refusal of Microsoft to include a gnu-compatible C compliler with Windows keeps guys like me behind the rest of the pack).
- It's fun. Sounds weird, I know. But it's not just me saying that. The ease with which I can start building an app and see results, with tests from the start, make it more fun to work on Rails apps.
- It's all free.
- The Rails core is kept to a minimum. There's more power with a lot less API "surface area" than any other framework I know. Most Rails developers don't need intellisense, because it's much easier to just know what to do; and when you're not sure, everything is so consistent between classes, it's much easier to just guess the right thing to do.
- Plugins from the community. Awesome.
Agree with any of these in particular? Have a question about any of them? Think I'm off my rocker? Drop me a comment and let me know.



