Description: A great book for learning design patterns in a way that will make you better at solving software design problems, and better at speaking the language of patterns with others on your team.
Copyright: 2004 O’Reilly Media, Inc.
Passages that I highlighted in my physical book, or thought were important.
Takeaway: Use encapsulation to make it easier to alter or extend the parts of your code that need to change without affecting those that don’t.
Takeaway: Try not to write your code in a way that locks you into using a specific implementation. Doing so leaves you with little room for change. Instead, break your code into chunks that can be more managed using interfaces/supertypes.
Takeaway: Using composition gives you more flexibility. It lets you encapsulate a family of algorithms into their own set of classes, but it also lets you change behavior at runtime as long as the object you’re composing with implements the correct behavior interface.
Takeaway: Writing in a way that loosely couples designs will make it possible to build flexible object-oriented systems that can handle change. It’s all about minimizing the interdependency between objects.