Always Learning

Advanced Search

Practical Object-Oriented Design

Practical Object-Oriented Design

An Agile Primer Using Ruby
2nd Edition

Sandi Metz

Nov 2018, Paperback, 288 pages
ISBN13: 9780134456478
ISBN10: 0134456475
This title is ordered on demand which may result in extended delivery times.
Special online offer - Save 30%
Was 32.99, Now 23.09Save: 9.90
  • Print pagePrint page
  • Email this pageEmail page
  • Share

Ruby’s widely admired simplicity 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, thoroughly explained via simple and practical Ruby examples.

Sandi Metz has distilled a lifetime of conversations and presentations about object-oriented design into a proven set of Ruby-focused practices for crafting manageable, extensible, and pleasing code. She demonstrates 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, poodr.info. Fully updated for Ruby 2.X, this guide shows how to:

  • 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

Whatever your previous Ruby experience, Practical Object-Oriented Design in Ruby, Second Edition will guide you to the superior outcomes you’re looking for.

2nd Edition TOC to follow; 1st Edition TOC shown below.

Foreword
Introduction
1: Object-Oriented Design
2: Designing Classes with a Single Responsibility
3: Managing Dependencies
4: Creating Flexible Interfaces
5: Reducing Costs with Duck Typing
6: Acquiring Behavior Through Inheritance
7: Sharing Role Behavior with Modules
8: Combining Objects with Composition
9: Designing Cost-Effective Tests
Afterword
Index

  • 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

Sandi Metz is a programmer, teacher, author, and sometime consultant. In the past 30+ years she has written innumerable applications and creates practical solutions that produce working software that is easy to change. She has spoken about object-oriented design and refactoring at international Ruby conferences since 2009.

Praise for the first edition of Practical Object-Oriented Design in Ruby


“Meticulously pragmatic and exquisitely articulate, Practical Object Oriented Design in Ruby makes otherwise elusive knowledge available to an audience which desperately needs it. The prescriptions are appropriate both as rules for novices and as guidelines for experienced professionals.”

—Katrina Owen, Creator, Exercism

“I do believe this will be the most important Ruby book of 2012. Not only is the book 100% on-point, Sandi has an easy writing style with lots of great analogies that drive every point home.”

—Avdi Grimm, author of Exceptional Ruby and Objects on Rails

“While Ruby is an object-oriented language, little time is spent in the documentation on what OO truly means or how it should direct the way we build programs. Here Metz brings it to the fore, covering most of the key principles of OO development and design in an engaging, easy-to-understand manner. This is a must for any respectable Ruby bookshelf.”

—Peter Cooper, editor, Ruby Weekly

“So good, I couldn’t put it down! This is a must-read for anyone wanting to do object-oriented programming in any language, not to mention it has completely changed the way I approach testing.”

—Charles Max Wood, Ruby Rogues Podcast co-host and CEO of Devchat.tv

“Distilling scary OO design practices with clear-cut examples and explanations makes this a book for novices and experts alike. It is well worth the study by anyone interested in OO design being done right and ‘light.’ I thoroughly enjoyed this book.”

—Manuel Pais, DevOps and Continuous Delivery Consultant, Independent

“If you call yourself a Ruby programmer, you should read this book. It’s jam-packed with great nuggets of practical advice and coding techniques that you can start applying immediately in your projects.”

—Ylan Segal, San Diego Ruby User Group

“This is the best OO book I’ve ever read. It’s short, sweet, but potent. It slowly moves from simple techniques to more advanced, each example improving on the last. The ideas it presents are useful not just in Ruby but in static languages like C# too. Highly recommended!”

—Kevin Berridge, software engineering manager, Pointe Blank Solutions, and organizer, Burning River Developers Meetup

“This is the best programming book I’ve read in ages. Sandi talks about basic principles, but these are things we’re probably still doing wrong and she shows us why and how. The book has the perfect mix of code, diagrams, and words. I can’t recommend it enough and if you’re serious about being a better programmer, you’ll read it and agree.

—Derick Hitchcock, software engineer, Cisco

“Metz’s take on the subject is rooted strongly in theory, but the explanation always stays grounded in real world concerns, which helped me to internalize it. The book is clear and concise, yet achieves a tone that is more friendly than terse.”

—Alex Strasheim, network administrator, Ensemble Travel Group

“Whether you’re just getting started in your software development career, or you’ve been coding for years (like I have), it’s likely that you’ll learn a lot from Ms. Metz’s book. She does a fantastic job of explaining the whys of well-designed software along with the hows.”

—Gabe Hollombe, software craftsman, avantbard.com