Goodreads helps you keep track of books you want to read.
Start by marking “Design Patterns in Ruby” as Want to Read:
Design Patterns in Ruby
Enlarge cover
Rate this book
Clear rating
Open Preview

Design Patterns in Ruby

(Addison-Wesley Professional Ruby Series)

4.14  ·  Rating details ·  764 ratings  ·  45 reviews
Praise for Design Patterns in Ruby

" Design Patterns in Ruby documents smart ways to resolve many problems that Ruby developers commonly encounter. Russ Olsen has done a great job of selecting classic patterns and augmenting these with newer patterns that have special relevance for Ruby. He clearly explains each idea, making a wealth of experience available to Ruby devel
Hardcover, 352 pages
Published December 1st 2007 by Addison-Wesley Professional
More Details... Edit Details

Friend Reviews

To see what your friends thought of this book, please sign up.

Reader Q&A

Community Reviews

Showing 1-30
Average rating 4.14  · 
Rating details
 ·  764 ratings  ·  45 reviews

More filters
Sort order
Start your review of Design Patterns in Ruby
Aug 15, 2009 rated it really liked it
Good but overly wordy book of design patterns in ruby. Ruby implementations of design patterns are definitely terse which is exciting and the patterns are very useful. There were several cases where I could think of simpler or alternate implementations than the ones given (e.g. composite).

There was a little too much cruft around failed versions of the design pattern which obscured skimming for successful implementations when using the book as a reference. In my opinion book could be condensed b
Aug 14, 2017 rated it really liked it
A solid book on Design Patterns that serves as a nice introduction to the topic.

Sadly, it has some serious flaws that prevent it from being great. In order of decreasing importance:

- There is a vast amount of typographical mistakes (typos) in the text and formatting inconsistencies in the code samples. This makes reading the book distracting if you are prone to noticing them.
- I found the style of writing to be somewhat wordy. I think it would have served the book better to be terser and shorter
Dec 28, 2011 rated it really liked it
This was such a fun and useful book! It picks 14 out of the 23 commonly known design patterns in programming, and demonstrates how they can be uniquely expressed in Ruby. Then it adds three more that are commonly used in Ruby code.

This book is so well-written, with very understandable explanations and code, and plenty of fun quips to keep it light, but also very concise. This book weighs in at 340 pages, which is tiny for a programming book. I also like that this author didn't take the easy way
Eric Li
Dec 14, 2020 rated it it was amazing
One of those programming books that you can read like a collection of blog post rather than a text book.
As a newbie for Rails, I find the "design pattern in wild" section very helpful for learning RoR by example.
Dec 20, 2017 rated it really liked it
Pretty good overview of the Gang of Four’s original Design Patterns, but viewed through the lens of Ruby instead of Java.
Damian Esteban
Jan 12, 2018 rated it it was amazing
Fantastic intro to design patterns.
Jul 20, 2018 rated it really liked it
Focuses on the most common of the Gang of Four patterns in one of the most elegant languages. Highly recommended for Ruby developers.
Jan 27, 2019 rated it it was ok
This ruby is useful for shortly handled the code easily
Aug 03, 2019 rated it it was amazing
Shelves: computer-science
Great writer and it was really helpful for me to see examples in a language I'm familiar with. Learned a ton and will be revisiting as a reference for sure. ...more
Emmanuel Freddy
Jan 15, 2021 rated it it was amazing
Great book that builds up your understanding of design patterns and relates them to real world challenges of software design.
James Stewart
Feb 22, 2008 rated it really liked it
Shelves: techbooks
For many the idea of bringing design patterns to ruby is a terrifying one. Having taken refuge from over-engineered java projects (or for that matter, attempts to apply java engineering approaches to a somewhat dynamic language like PHP) the baggage that often goes along with design patterns isn’t what a recent convert is looking for. But as I mentioned in my last review of a design patterns volume, and series editor Obie Fernandez highlights in his foreword, design patterns don’t have to be use ...more
Leo Gallucci
Jul 30, 2013 rated it it was ok
Overall, interesting concepts here.
But this book wasn't was i was looking for regarding Design Patterns applied to Ruby.
Perhaps the book is a little outdated by now.
There is an entire chapter dedicated to Getting started with Ruby and i wonder why wasting pages on beginner stuff on a Design Patterns book..

More critics:

# Lacks Ruby idioms, e.g. page 181
@subject || (@subject =
# Doesn't embrace Ruby syntactic sugar like the memoized accessor ||=
@subject ||= BankA
Chris Wood
Jan 18, 2014 rated it really liked it
Shelves: technology
The original GoF book on the subject of design patterns over two decades ago provided a robust set of solutions aimed at creating modular, maintainable code in primarily statically typed languages. While these patterns port relatively seamlessly into dynamic languages, they fail to fully harness the expressive and concise power of a dynamic language such as Ruby.

"Design Patterns in Ruby" sits in the middle between an introduction to the ruby language (and dynamic typing in general) and an introd
May 08, 2014 rated it liked it
3.5 stars. The book provides a good overview of the design patterns using Ruby as its context. He makes the content accessible to readers with little/no experience with Ruby. The author maintained a conversational tone throughout the book, which is necessary to avoid it being boring. In several chapters the author missed opportunities to explain Ruby features that would assist in implementing the pattern. For example, (Ch. 7) calling the #each method without a block returns an external iterator ...more
Sep 09, 2008 rated it really liked it
Shelves: learning, software
Having recently taken a course on design patterns, I was eager to start applying them in my work. Most of the examples out there are very Java-oriented, and I was constantly wondering whether my implementations were "rubyish" enough. This book is an expensive but well-written and well-organized response to that problem. Olsen does a great job describing each pattern, how it's been traditionally described, how it changes in Ruby, and how it's actually been applied in the wild.

One of my favorite p
May 30, 2010 rated it it was amazing
Shelves: computing, read_2010
As a Java programmer finally checking out Ruby I must say that it felt like this book was written for me. I don't mean for someone "like" me but ME. I've studied the GoF patterns extensively and have always been left wanting (leading to my explorations into more expressive languages). However, Mr. Olsen seems to understand this exquisite yearning and addresses it head on. Each section presents a laser focus on the misshapen GoF pattern and systematically slices off the knobby bits until only the ...more
Jan 14, 2016 rated it it was amazing
Shelves: ruby
I was looking for a fast way to port the design patterns that I have learned over the last decade into Ruby so that I could feel proficient quickly. This book does it!

The author gets into the differences in architecture patterns as you would build them in Java and how and why you would do so differently in Ruby.

You also get a good dose of Domain Specific Languages and Ruby Metaprogramming.

I phased out a bit towards the end of this book. Shit was stretching my noggin the light fantastic. I will
Jun 20, 2012 rated it really liked it
Shelves: kindle
I've only referred to the GoF Pattern book a couple of times in the years when I had something I needed to do and just needed some ideas. I've been wanting to learn Ruby and Ruby on Rails for years, ever since seeing David Heinemeier Hansson do a presentation at an OSCON I attended. This book was a recommendation and I was very impressed with how Russ not only presented the pattern but described how to implement with Ruby that the most basic Ruby programmer could understand. I was also very impr ...more
Nov 09, 2013 rated it really liked it
Shelves: technical, ruby
Only a wee bit dated, but still a true Tour de Force showing how the well-know Design Patterns from the Gang of Four are well implemented in Ruby. Each chapter covers a particular pattern, but more importantly, discusses when to use them, and when to avoid them. Russ's writing style is high on explanation by demonstration (show me, don't tell me) but with good discussion about what is going on as well. The back part of the book discusses some patterns that have emerged in the Ruby world, especia ...more
Marko Boskovic
Sep 29, 2015 rated it really liked it
Less formal and easier to read then GoF Design Patterns, with many nice examples. And what is even better, it focuses on Ruby! It also includes many details on Ruby itself, which is great when it comes to the "tricks" you forgot about or never new, but mostly it just wastes your time. Better place for those would be in appendices.

I also noticed some errors in the examples code (ie defining attr_reader when clearly attr_writer is what is needed) and also some strange ways to write Ruby code, but
Willian Molinari
Nov 05, 2015 rated it really liked it
Shelves: text, computers
Read this one ~2013 and liked it a lot. I was interested in reading about design patterns but didn't want to go through the GoF book and read about many patterns that were not a reality for me a the time. Reading this book was great to go through the most common patterns without having to read the ones that make more sense on certain languages.

It was great to see that Ruby has great support for some patterns already. The best exemple to cite here is the Singleton pattern that is already implemen
Jan 17, 2010 rated it it was amazing
Shelves: professional
Great book. I'd never read about design patterns, so being introduced to them with a Ruby perspective was very valuable. It's a valuable introduction and store of information to keep in the back of my mind for the problems I'll encounter. (Like one I already have -- I'm about to use the Composite pattern for a personal project.) Definitely recommended for any Ruby developer. ...more
Harri Kauhanen
Oct 13, 2011 rated it liked it  ·  review of another edition
Shelves: ruby
Somewhat weird concept being a Ruby tutorial and patterns reference at the same time. Author's writing style is already showing signs of mastery... And master he becomes in his next book "Eloquent Ruby". Time for just one Ruby book? Pick the latter one. Definitely want a classical GoF point of view on things? This is not a bad book. ...more
Chris Adams
If you've learned to code with ruby as a first language, this book helps you understand why design patterns are so prominent in other languages, but it also helps explain why Ruby's dynamic nature lets you get by with the language's own features before needing to reach for the Gang of Four's techniques. ...more
Ben Rand
Apr 12, 2015 rated it really liked it
Shelves: programming
A good book on Design Patterns. I kind of like revisiting this topic frequently as I learn more each time I do. It's interesting to see the same patterns applied in different languages as they all bring their own nuances to it. Ruby is especially unique this way as its dynamic nature enables you to do things that are very difficult to pull off in more traditional languages (Java, C#). ...more
David Medinets
Mar 23, 2008 rated it really liked it
Russ Olsen has produced a handsome book full of basic design patterns. The second chapter provides a quick introduction to the Ruby language and then Russ hand-picks patterns that are relevant to Ruby programming.
Said A
Sep 09, 2012 rated it really liked it
Shelves: programming
This book will help you see how original GoF design patterns are done "the ruby way". If you are not familiar with design patterns, then you must first learn them. This book will not teach you them. It is a quick and easy read. ...more
Sep 22, 2012 rated it really liked it
The book explores GoF (Gang of Four) design patterns and a few commonly-used patterns by Ruby developers.

I just wish the author gave more practical real-world examples rather than ducks and ponds.
Oct 19, 2012 added it
an interesting book. i wonder if the richness
of the ruby language somehow makes patterns LESS interesting.
it seems to me that the code that you write is closer to
simply reflecting the pattern than other languages.
Mike Siegel
Jul 17, 2015 rated it really liked it
This book helped me understand many of the nuances of Ruby and was a great refresher of the typical Design Patterns spoken about by GoF.

I enjoyed the emphasis on when and where to use a pattern and the caution that many developers use and abuse some patterns.
« previous 1 next »
There are no discussion topics on this book yet. Be the first to start one »

Readers also enjoyed

  • The Well-Grounded Rubyist
  • Agile Web Development with Rails: A Pragmatic Guide
  • Getting Real: The Smarter, Faster, Easier Way to Build a Web Application
  • Metaprogramming Ruby
  • Programming Ruby: The Pragmatic Programmers' Guide
  • Ruby on Rails Tutorial, 6th Edition: Ruby on Rails 6
  • Designing Data-Intensive Applications
  • The Effective Engineer: How to Leverage Your Efforts In Software Engineering to Make a Disproportionate and Meaningful Impact
  • On Writing Well: The Classic Guide to Writing Nonfiction
  • Remote: Office Not Required
  • The Lean Startup: How Today's Entrepreneurs Use Continuous Innovation to Create Radically Successful Businesses
  • It Doesn't Have to Be Crazy at Work
  • Mobile First
  • Effective Java
  • Design Patterns: Elements of Reusable Object-Oriented Software
  • Seven Languages in Seven Weeks
  • The Pragmatic Programmer: From Journeyman to Master
  • Release It!: Design and Deploy Production-Ready Software (Pragmatic Programmers)
See similar books…

Goodreads is hiring!

If you like books and love to build cool products, we may be looking for you.
Learn more »

Other books in the series

Addison-Wesley Professional Ruby Series (1 - 10 of 14 books)
  • Practical Object Oriented Design in Ruby
  • Eloquent Ruby
  • Ruby on Rails 3 Tutorial: Learn Rails by Example (Addison-Wesley Professional Ruby Series)
  • The Rails 3 Way
  • Rails Antipatterns: Best Practice Ruby on Rails Refactoring
  • Service-Oriented Design with Ruby and Rails
  • Distributed Programming with Ruby
  • Refactoring: Ruby Edition, Adobe Reader
  • The Rails Way
  • Professional Ruby Series Writing Efficient Ruby Code

Related Articles

The beauty of a paperback novel is multidimensional. Allow me to explain: The format allows you to catch up on some of 2020's biggest books...
15 likes · 1 comments