"Introducing" Design Patterns Thinking

October 16, 2017 — Posted by Al Shalloway

I put "introducing" in quotes because we've been doing this for almost two decades. But few people seem to be aware of patterns as a thought process so I thought I'd start writing more about it. Most everyone has learned that design patterns are valuable as “solutions to recurring problems in a context.” Since their identification we’ve seen patterns hatching (combining patterns), refactoring to patterns (changing designs until they implement the intention of patterns), and thinking in patterns (thinking in terms of the problems the patterns portend to solve). However, there is a deeper level and intent of patterns. Christopher Alexander, the creator of patterns, coined the definition given above near the beginning of his iconic book “The Timeless Way of Building.” However, four pages from the end of the book he states -

“At this final stage, the patterns are no longer important: the patterns have taught you to be receptive to what is real.” 

Combining, refactoring or thinking in patterns is not the real intention of patterns. Their intention is to teach you to be receptive to what’s real. Learning common patterns such as adapter, façade, strategy, singleton and the like are good starts. But the true power of patterns is in understanding the principles underneath them and the practices they suggest you use.

There are several principles underneath the popular Gang of Four Patterns. Some of these were described at the beginning of the book but in such a way as to be hard to understand without already understanding what patterns were. These principles include:

  • the open-closed principle
  • encapsulate by policy, reveal by need
  • separation of concerns
  • separate use from creation

Understanding these principles not only enables participants to improve their object-oriented skills it enables adjusting the patterns as required to fit the problem being solved when an exact match doesn’t occur. There are also several practices that can be gleamed from design patterns. A “practice” is an almost no-cost habit that reaps huge rewards. An example in a non-software field is the practice of doctors washing their hands before they see a patient. These seems obvious now, but it wasn’t always so. There are many software practices, that if followed, greatly improve one’s design and code. 

Perhaps most importantly, the course incorporates the design paradigm Christopher Alexander suggests but which is usually ignored in patterns training. This is that design is not a mere combination of objects. Instead, it suggests the intention of the patterns be applied in a way that they build upon each other. This insight led to Al Shalloway and Jim Trott’s book on Design Patterns Explained: A New Perspective on Object-Oriented Design.While this book does teach several patterns, it's main intent was to: 1) explain the thought process underneath the patterns, 2) show how the normal approach of designing objects as “nouns and verbs” only takes you so far, 3) introduce patterns thinking as a way of doing higher level designs.

In the current Agile space of emergent design how to write code that is changeable over time is critical – this is one aspect that is often ignored in patterns courses. They are not only useful for handling multiple variations at one time but variations over time.

If you are interested in learning more, check out our course Design Patterns Thinking (http://www.netobjectives.com/training/design-patterns ). Please feel free to ask us questions at our linkedin support group as well - https://www.linkedin.com/help/linkedin/answer/71240

 

 

Subscribe to our blog Net Objectives Thoughts Blog

Share this:

About the author | Al Shalloway

Al Shalloway is the founder and CEO of Net Objectives. With over 40 years of experience, Alan is an industry thought leader in Lean, Kanban, product portfolio management, SAFe, Scrum and agile design.



        

Blog Authors

Al Shalloway
Business, Operations, Process, Sales, Agile Design and Patterns, Personal Development, Agile, Lean, SAFe, Kanban, Kanban Method, Scrum, Scrumban, XP
Cory Foy
Change Management, Innovation Games, Team Agility, Transitioning to Agile
Guy Beaver
Business and Strategy Development, Executive Management, Management, Operations, DevOps, Planning/Estimation, Change Management, Lean Implementation, Transitioning to Agile, Lean-Agile, Lean, SAFe, Kanban, Scrum
Israel Gat
Business and Strategy Development, DevOps, Lean Implementation, Agile, Lean, Kanban, Scrum
Jim Trott
Business and Strategy Development, Analysis and Design Methods, Change Management, Knowledge Management, Lean Implementation, Team Agility, Transitioning to Agile, Workflow, Technical Writing, Certifications, Coaching, Mentoring, Online Training, Professional Development, Agile, Lean-Agile, SAFe, Kanban
Ken Pugh
Agile Design and Patterns, Software Design, Design Patterns, C++, C#, Java, Technical Writing, TDD, ATDD, Certifications, Coaching, Mentoring, Professional Development, Agile, Lean-Agile, Lean, SAFe, Kanban, Kanban Method, Scrum, Scrumban, XP
Marc Danziger
Business and Strategy Development, Change Management, Team Agility, Online Communities, Promotional Initiatives, Sales and Marketing Collateral
Max Guernsey
Analysis and Design Methods, Planning/Estimation, Database Agility, Design Patterns, TDD, TDD Databases, ATDD, Lean-Agile, Scrum
Scott Bain
Analysis and Design Methods, Agile Design and Patterns, Software Design, Design Patterns, Technical Writing, TDD, Coaching, Mentoring, Online Training, Professional Development, Agile
Steve Thomas
Business and Strategy Development, Change Management, Lean Implementation, Team Agility, Transitioning to Agile
Tom Grant
Business and Strategy Development, Executive Management, Management, DevOps, Analyst, Analysis and Design Methods, Planning/Estimation, Innovation Games, Lean Implementation, Agile, Lean-Agile, Lean, Kanban