I'm a fan of .net, but I recently got into RoR and here is the experience I had:
It was somewhat confusing until I read the Agile Web Development with Ruby on Rails book. It is one of the best programming books I've ever read. It's clear and concise and explains things in a way that is suitable for all levels (if you're a guru you'll
skim some chapters but you'll still be glad you read them)...
Rails is a highly productive system just like asp.net, but here are the differences:
With asp.net if you're writing a serious app that you want to be simple, conceptually clear, etc., you write data acccess classes with methods to handle the IO with the database. You then write your business logic classes that call upon the data access methods
when necessary, and finally you write your user interface, which interacts with the business objects.
In asp.net doing all this requires a fair bit of thought and a lot of coding of very similar methods, particularly in the data access classes. I used to find this quite boring and often resorted to cutting and pasting code and doing search and replace when
In Rails you get ActiveRecord which creates all of those data access methods automatically. You can tell these "model" classes what fields are required, which are read only, etc. If you've seen the blogging application in the demo video, you've seen the has_many
and belongs_to relationships. With Rails, rather than writing SQL joins you simply define these relationships once. Then, you can use object oriented syntax such as user.posts to grab a collection of all of a user's posts. If you have a users table you
have a User data access class automatically. If posts have a user_id, then you can call user.posts to find a list of posts.
With rails 1.1 (coming out in a few days) the power of this functionality has been increased DRASTICALLY to handle a lot more obscure kinds of joins automatically.
Rails gives you all this for free so you can focus on writing good business logic and maybe a few test cases too. Business logic in Rails is known as your "Controller" classes. Look up MVC to see how they got that terminology.
On the "view" side you get a simple templating language very similar to asp and asp.net's, which is nice so there's virtually no learning curve.
As your app changes and you add more complexity and features, the standard layout of a Rails application makes this ultra easy to manage. You'll find (as I did in a HUGE way) that you'll be able to tackle projects that are bigger than those you'd have felt
comfortable tackling using other platforms. Why? Because you'll know that you'll be able to think about designing the app rather than managing a bunch of files and data access methods.
The Ruby language example above is highly misleading. It's extremely easy to learn, and you can hold off on learning some of its more guru-oriented features, because it's unlikely that you'll need them for most web applications. Simple stuff like doing business
logic, creating dynamic web pages, etc, is so easy that the Ruby syntax doesn't really even need to be taught. There are a handful of conventions that the book I recommended above dedicates a few pages to and that's all you need to worry about until you get
to the point where you're bored some evening and want to learn about closures and duck typing, etc.
I've recently been looking into Scaling rails apps, and all it requires is a shared folder for storing session data and a standard stateless clustering system. You can even separate out different app servers if you want to and let your web server avoid that
workload. Setting this up is not plug and play, but it will be easy for anyone reading this forum.
The Ajax integration is also top notch and makes writing slick Ajax stuff absolutely cake. I'll let you discover this for yourself though, because I don't want to ruin the fun you'll have.
So my advice to you if you're curious about Rails is quite simple: Buy the Agile book. I got it for like $23 on Amazon. If you're a guru you don't need this book, but I think it will save anyone time, since the tutorials that are on the web aren't really
all that great, although this is changing. Also, download RadRails and check out the ctrl-shift-v feature.
One other note, rails gives you a real time development log that shows the exact queries that it's generating w/ ActiveRecord and their overall performance impact. If you see something that you want to change, you can simply write a method that uses hand-tuned
SQL, or even just use SQL in one of the find methods that you get as part of ActiveRecord:
User.find_by_sql("SELECT blah blah outer join blah IN (SELECT blah)")
Oh and if you put the word breakpoint in your code there's a slick utility that lets you get full access to the running web app, this is every bit as slick as Visual Studio's debugging of web apps.
Now here is my fluff comment about Rails:
I think one of the best things about Rails is its aesthetics. The code looks great, is free of extra syntactic garbage, and you feel like you do when you use an iPod, like you're using something built with top-notch craftsmanship.
Also, the #rubyonrails channel on IRC has been a lot of help to me. If you're patient there is usually a guru in there who can help with most any question, though I recommend reading the Agile book first so that you'll have a bit more of a clue and avoid wasting
too much time with the rather cryptic documentation at api.rubyonrails.com