Practical Object-oriented Design in Ruby

Practical Object-oriented Design in Ruby

An Agile Primer

Book - 2013
Average Rating:
Rate this:
The Complete Guide to Writing More Maintainable, Manageable, Pleasing, and Powerful Ruby Applications


Ruby’s widely admired ease of use has a downside: Too many Ruby and Rails applications have been created without concern for their long-term maintenance or evolution. The Web is awash in Ruby code that is now virtually impossible to change or extend. This text helps you solve that problem by using powerful real-world object-oriented design techniques, which it thoroughly explains using simple and practical Ruby examples.


Sandi Metz has distilled a lifetime of conversations and presentations about object-oriented design into a set of Ruby-focused practices for crafting manageable, extensible, and pleasing code. She shows you how to build new applications that can survive success and repair existing applications that have become impossible to change. Each technique is illustrated with extended examples, all downloadable from the companion Web site,


The first title to focus squarely on object-oriented Ruby application design, Practical Object-Oriented Design in Ruby will guide you to superior outcomes, whatever your previous Ruby experience. Novice Ruby programmers will find specific rules to live by; intermediate Ruby programmers will find valuable principles they can flexibly interpret and apply; and advanced Ruby programmers will find a common language they can use to lead development and guide their colleagues.


This guide will help you

  • Understand how object-oriented programming can help you craft Ruby code that is easier to maintain and upgrade
  • Decide what belongs in a single Ruby class
  • Avoid entangling objects that should be kept separate
  • Define flexible interfaces among objects
  • Reduce programming overhead costs with duck typing
  • Successfully apply inheritance
  • Build objects via composition
  • Design cost-effective tests
  • Solve common problems associated with poorly designed Ruby code


Book News
Metz (software architecture, Duke U.) explores designing object-oriented software from a practical rather than academic perspective, and with a particular emphasis on creating code that works immediately but can be adapted later. She assumes readers have at least tried to write object-oriented code before, but not that they have necessarily succeeded. Among her topics are designing classes with a simple responsibility, creating flexible interfaces, reducing costs with duck typing, sharing role behavior with modules, and designing cost-effective tests. Annotation ©2013 Book News, Inc., Portland, OR (

Publisher: Upper Saddle River, NJ : Addison-Wesley, 2013
ISBN: 9780321721334
Characteristics: xxiii, 247 p. : ill. (some col.) ; 23 cm


From the critics

Community Activity


Add a Comment

May 26, 2016

Don’t let the “in Ruby” part of the title distract you from the fact that this book is amazing for any sort of object-oriented coding work — regardless of language.

The principles and practices Metz presents have significantly improved my coding. I got so excited at some parts of the book that I was chuckling and clapping my hands.

I can’t think of any circumstance (beyond someone not knowing how to read English) where I wouldn’t recommend this book to a software programmer.


Add Age Suitability

There are no ages for this title yet.


Add a Summary

There are no summaries for this title yet.


Add Notices

There are no notices for this title yet.


Add a Quote

There are no quotes for this title yet.

Explore Further

Browse by Call Number

Subject Headings


Find it at BPL

To Top