The Power of Object-Oriented Design

Created on Jul 7, 2021

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, video and audio show host,

One of the core truism of software development is that as your code grows and requirements for the system that you are building change, additional logic will be added that is not yet present in the current system. In almost all cases, maintainability over the life of the code is more important than optimizing its present state. ~ Obie Fernandez, Series Editor (Addison Wesley Professional Ruby Series)

Chapter 1: Object-Oriented Design

The problem with poorly designed small applications is that if they are successful they grow up to be poorly designed big applications. They gradually become tar pits in which you fear to tread lest you sink without a trace. Changes that should be simple may cascade around the application, breaking code everywhere and requiring extensive rewriting. Tests are caught in the crossfire and begin to feel like a hindrance rather than a help.

This book is not about patterns; however, it will prepare you to understand them and give you the knowledge to choose and use them appropriately.

If Agile is correct, two other things are also true. First, there is absolutely no point in doing a Big Up Front Design (BUFD) (because it cannot possibly be correct), and second, no one can predict when the application will be done (because you don’t know in advance what it will eventually do). OOD is concerned with a much narrower domain. It is about arranging what code you have so that it will be easy to change.

Class-based OO languages like Ruby allow you to define a class that provides a blueprint for the construction of similar objects. A class defines methods (definitions of behavior) and attributes (definitions of variables). Methods get invoked in response to messages.

Final Thoughts

In this chapter, we’ve been on a quick tour of the object-oriented paradigm.

We’ve seen how important design principles and patterns are in building software.

Here, the author debriefs that learning objected-oriented design is step #1 before going deep into design patterns.

See you in chapter 2 notes!

Get Practical Object-Oriented Design in Ruby now! (if you haven’t already)

or this second edition

Practical Object-Oriented Design in Ruby by SandiMetz

By the author


Get the next FREE ebook ‘Disciplined’ once released and more exclusive offers in your inbox

Published on medium