Object-oriented languages have an opinion about how best to model the world. Object-oriented programming offers unique affordances—that is, object-oriented languages want to be used in specific ways. When your coding style aligns with object-oriented programming’s natural inclinations, it’s easy to create intuitive, expressive, and maintainable apps. Woe be unto you, however, if your app’s code labors at cross purposes with object-oriented programming’s expectations. This clash of viewpoints leads to confusing, unmaintainable applications that are filled with recurring conditionals, impenetrable methods, and colossal classes.
Sandi Metz explains what object-oriented programming wants, using straightforward examples to indoctrinate you into object-oriented thinking. You’ll leave raring to write loosely coupled, message-centric, small-object object-oriented code that isolates conditionals and leans on polymorphism. Once you understand object-oriented programming’s natural affordances, everything becomes easy. Your code will never be the same.
Sandi Metz writes, consults, and teaches about object-oriented design and is the author of Practical Object-Oriented Design in Ruby and 99 Bottles of OOP. Sandy believes in simple code and straightforward explanations. She prefers working software, practical solutions, and lengthy bicycle trips (not necessarily in that order).
©2018, O'Reilly Media, Inc. • (800) 889-8969 or (707) 827-7019 • Monday-Friday 7:30am-5pm PT • All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. • firstname.lastname@example.org