Ruby on Rails first impressions

Ruby
Photo by Afternoon Sunlight

Ruby on Rails has often attracted me, but I've never had a strong enough reason to dive in. This afternoon, as I unhappily contemplated writing yet another web app with Twitter authentication in PHP, I finally caved. I did think about trying Django instead, since I'm using Python heavily in the back end, but the examples I found felt a bit too bondage-and-discipline for a UI that I want to rapidly iterate on. So, five years after the rest of the world, here's what I discovered in my explorations.

Fantastic Documentation. I read through the first few chapters of the Rails Tutorial book to get a feel for how things worked. It's task-oriented, hands-on, focused on things I care about and generally nicely written. All of the code and examples Just Worked, and from the footnotes this is obviously an actively maintained and tested guide.

Arrgghh Version Changes. With my confidence boosted by working with the tutorial, I set out to integrate this open-source Twitter OAuth module. None of the directions worked, some of them didn't even make sense based on what I'd learned. What is 'script/generate'? Is that like 'rails generate'? After digging I realized it was created for Rails 2 and I was on 3. How big a change could that be? I eventually got things working, but I had to hack so many things manually, from the option loading to the database migration, it was obviously a massive shift in the way things were done. In a way it's really refreshing to find a community so willing to radically clean up things between versions, but it does orphan valuable external projects like this.

Everything's There. It is really nice to have a single, standard way to do most tasks. Since git is the recommended source tool, deploying to Heroku becomes very easy to explain. When things work, they just work. There seems to be One True Way for everything from laying out project files to which source code control system and database to use, and that feels very Apple-esque. The un-hackerish secret I learned from Mr Jobs was that denying people choices saves a lot of confusion and explaining. This is definitely very constraining at times, but when it works it gives a great user experience. I know there's nothing here that I couldn't technically be doing with PHP, but getting it all out of the box and easily google-able (because everyone's using a similar setup) makes a big difference.

I'm pretty happy with my progress today, I have a basic Twitter authentication cycle working, and I'm definitely discovering parts of Ruby that make me smile. I don't know if RoR will become my framework of choice going forward, but it definitely seems a strong fit for a lot of my tasks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: