Observations from a rushed Ruby on Rails project
October 10, 2007
programming / projects / ruby
Over the last month or so, I’ve been hurriedly attempting to learn Ruby on Rails for a client project. Essentially, this project has involved too many requirements with too little time. So basically, I’ve been a desperate designer seeking a way to program a site with very specific requirements in as little time as possible, with as low a learning curve as possible.
I know PHP fairly well, but I don’t know any of the MVC frameworks that exist for it (Cake, Symfony, etc.) If time ever allows, or a project dictates that I do so, I may try to learn these, but for this one I thought it was wisest to go ahead and dive headfirst into Rails, and learn it as I go. So, I bought a book. This book teaches Rails through designing a social networking site.
Thus, it covers Models, Views, and Controllers in what I would consider to be significant detail. It covers migrations, database access, relationships, and so on. Toward the end, it covers REST and briefly covers scaffolding. I have heard that scaffolding will not be a part of the next full version of Rails, so I have not used it in my client project. For the most part, though, everything else that I learned was essential to the development of this site.
Observations thus far
Essentially, Rails is amazing. At this point, I’m not ready to be posting code examples, but so many things are happening so much faster and easier than they would in PHP, or .NET; which of course is the reason I’m trying it in the first place.
The slogan in the Rails community is “convention over configuration.” In .NET, and more so in Java from what I hear, one has to configure a lot of things in the initial setup of the application. In Rails, there are conventions built in so that one does not have to do this. I love this. Almost everything I have needed to do so far has a convention built into Rails that one can use to do it. My task has been to learn as much Ruby as possible, and learn where these conventions are built so that I can take advantage of them. Brilliant.
The Rails community
In PHP, there is a vibrant community. There are any number of forums where one can find help for almost any issue. Many times, i have received an error for whatever random reason, copied that error exactly, and pasted it into Google only to find out that others have had the same error, and to learn how to resolve it.
Rails isn’t there yet, or my errors aren’t there yet, but the forums have been a lifesaver. Rails Forum and Ruby Forum are full of people that have been so gracious and willing to help.
As this project continues, and after it’s over especially, I hope to continue learning the best practices for Rails, and to continue diving into Ruby as the programming language that powers Rails. There’s something about being on a deadline that forces me to really start learning things…