Practical Object-Oriented Design in Ruby: An Agile Primer

· Addison-Wesley
4.4
27 reviews
Ebook
272
Pages

About this ebook

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, poodr.info.

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

Ratings and reviews

4.4
27 reviews
Stephen Aghaulor
April 19, 2014
As a self taught programmer, this book completely changed the way I think about writing code. It takes an approach of guiding you through what your first gut feel design would look like, demonstrating the consequences of said design, and finally guiding to an optimal object oriented design. At times Metz sort of waxes philosophical, but it's well placed and adds some much needed flavor to such a dry subject (pun intended).
3 people found this review helpful
Kgotso Koete
December 15, 2017
Perhaps one of the few resources that are friendly enough for beginner programmers to experiment with OOP. The book is written for humans, with empathy and pragmatism in mind. Readers will write the code for each scenario and will refactor based on principles taught in the book. If only we could get the author Sandy Metz to explain other 'rocket sciences' like how politics works, how rockets are built, how and colonies are formed and how functional programming is helpful.
2 people found this review helpful
David Lormor
June 13, 2014
Definitiely lives up to the hype! The concepts in this book will totally change the way you think about your objects.
3 people found this review helpful

About the author

Sandi Metz has thirty years of experience working on projects that survived to grow and change. She now writes code every day as a software architect at Duke University, where her team solves real problems for customers who have large object-oriented applications that have been evolving for more than fifteen years. She has spoken at Ruby Nation and speaks regularly at the Gotham Ruby Users Conference.

Reading information

Smartphones and tablets
Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.
Laptops and computers
You can listen to audiobooks purchased on Google Play using your computer's web browser.
eReaders and other devices
To read on e-ink devices like Kobo eReaders, you'll need to download a file and transfer it to your device. Follow the detailed Help Center instructions to transfer the files to supported eReaders.