Design Patterns in Ruby

Author: Russ Olsen
4.6
All Stack Overflow 11
This Month Hacker News 1

Comments

by anonymous   2017-08-20

For me OO didn't 'click' until I read a book about design patterns. If you're already comfortable with concepts like abstract classes, interfaces, etc that's only half the battle.

The next step is figuring out why you should prefer composition over inheritance, how to code to an interface and how to write your classes so that they are decoupled and well-encapsulated. Design patterns show you solutions to common OO problems and help you structure your code adhering to the above guidelines.

I can't recommend any particular books about C++ but the GOF book is the standard on Design Patterns (Java). I prefer books that talk about design patterns in a particular language so that you can get concrete code examples. Design Patterns In Ruby is pretty good, as is PHP: Objects, Patterns and Practice.

I get the feeling that your instructor doesn't particularly know what he's talking about. 'More classes' is pretty useless advice by itself.

by anonymous   2017-08-20

This is the only book you'll need for ruby:

Design Patterns in Ruby

For a beginning book on rails this one is easy to read and teaches most of the fundamentals:

Simply Rails 2

by anonymous   2017-08-20

Use this as your primary book: Design Patterns in Ruby and this as your reference: The Ruby Programming Language.

You will also definitely want to read thoroughly the latter book after you've finished design patterns. Once you absorbed those two this is a nice follow-up: Ruby Best Practices.

As to why the recommendation of design patterns as your primary text see here: Design Patterns