Vladimir Sarić wrote this on March 30, 2012

Reflecting on OOP and Rails

In my last post I wrote about having to refactor a pretty complicated process in a Rails application, with an eventual goal being the ability to pull it out into a gem or a standalone application.

With that in mind, I proceeded into putting all of my code into the ‘lib’ directory and isolating it from Rails as much as possible.

Unlike a lot new Rails developers, I learned the basics of Ruby before jumping head deep into Rails, but until then, I never really wrote pure Ruby production code.

I was amazed at how much fun it was to develop using just Ruby. Even writing tests felt more pleasing. But, at the same time, I reliazed how much I didn’t know about object oriented design, both in Ruby and in general. Also, I realized how great Rails really is - it makes a lot of architectural decisions for that can take you a long way.

The realization of how much I lack in the OOP know-how, made me pick up Grady Booch’s seminal book Object-Oriented Analysis and Design with Applications. Which, to be honest, I should have done long ago.

So, I want to encourage every Rails developer out there, to develop at least one application using just the Ruby languague. It doesn’t have to be a full blown web application, but it should be something more complicated than just a simple script.

I guarantee, you will learn a lot. And not just about Ruby and OOP, but also, indirectly, about Rails. At the same time you will start to appreciate Rails even more. And all of this while having fun.

comments powered by Disqus

Suggested Reads

Rails Testing Handbook

A new ebook on building test-driven Rails apps with RSpec and Cucumber.

At Rendered Text, we have a long history with Ruby on Rails. Checking the blog archive reminds me that we published first posts about working with Rails way back in 2009.


Rendered Text is a software company. For questions regarding Semaphore, please visit semaphoreci.com. Otherwise, feel free to get in touch any time by sending us an email.