2 Questions about RoR
1. Can anyone recommend any good books on beginning Ruby on Rails? I have good general programming knowledge (I can do ASP/ASP.NET/PHP etc) but I've never used Ruby and I want to add it as another string to my bow.
2. How come RoR has taken off so much with startups? Admittedly I can only name Justin.tv and Twitter off the top of my head right now, but it seems to be the startup language of choice at the moment. Why is this?
27 comments
[ 2.9 ms ] story [ 66.3 ms ] thread2. Because it's been designed by smart people who "get it" with regards to agile development, which is what startups need. In addition, the community has a "culture" which many startups identify with.
Getting the Programming Ruby 'Pickaxe' book for Ruby is good too.
Look at CakePHP to get familiar with ActiveRecord for PHP. I don't really recommend CakePHP as a development platform, but it's a great way to understand Rails if Ruby+Rails at the same time is too complicated.
2) My opinion of why RoR has taken off is because ActiveRecord makes normal day-to-day activities simple. Verification is already handled. Although PHP and Ruby are roughly equal in speed (Ruby 2.0 is going to be a lot faster though!), Rails isn't. But once you're done, built-in caching features help it scale at least a little bit. Of course if you're worried about scalability, just program the whole thing in C. :P (That's what Amazon does!)
But they started with RoR didn't they?
2) Because it is very easy to implement an idea in a day and see if it sticks. More than that, when you're faced with a task that might not have much reward, it is easier to do if it doesn't feel like work. Programming in PHP/Java/C#/etc generally feels like work. Programming in Ruby generally feels like fun.
In particular I am not a fan of the Agile Web Development with Rails book; apart from anything else it is way behind the state of the art at this stage.
I actually like to learn from reference books; maybe its just me.
I am currently reading "Practical Social Networking Sites with Rails", and although its a decent book, the author tends to skip some of the most important details, leaving you wondering how something came about. I would not recommend it.
I have read 'Ruby for Rails', and its definitely a good book. David Black is a very good author and teaches you Ruby and shows you how a lot of the 'black-magic' in Rails happens.
Here is someone else's review of some of the books - http://antoniocangiano.com/rails-books/
For Ruby, I would recommend Peter Cooper's book over Programming Ruby any day... especially if you are new to Ruby and/or OOP in general.
And don't bother with RESTful Web Services.. if you're using Rails 2.x then you only need a half page tutorial on how to use REST, not an entire book.
I agree with you about AWDWR but I'm not so sure about this. RESTful Web Services is very good, and gives a much broader perspective about how & why REST works than you will get from just using Rails 2.
Here's my liveblogging take of my first three weeks with Rails:
http://internetducttape.com/category/ruby-on-rails/
Books are not always the easiest thing to learn from. I found screencasts to be an excellent way to pick up all sorts of stuff for Rails.
Check out peepcode.com, railscasts.com and showmedo.com for starters.
Some content is free (railscasts), others not so free.
N.B. As with virtually all Rails books, it's a bit out of date (despite having only just come out last summer!), but we focus on general techniques that are plenty useful in Rails 2. I'm currently building a site with some of the same features as the book application, and I often find myself referring to the book for guidance.
Like with PHP, ASP, Perl and others, I learned the language simply by looking at existing apps, hacking them up, then sitting down and making something of my own and all the fun trial and error that gives.
I find it a much nicer way to learn a language than from a book. But then, I'm a very hands-on person.
2) Right time, right place. Rails came out around the same time the second wave of web startups picked up.
Also the argument is that Rails allows a smaller team (or even just one person) to write more functionality in less time. Whether that's true or not for you may vary.
2) B/c it has a great ORM layer (ActiveRecord) and strong ajax libraries (integration with prototype/script.aculo.us) which make it easy to quickly put together a very well organized app that has a lot of UI sizzle.
I also expect Merb to continue to gather steam, especially for people who "get" rails and who want to take it in specialized directions.