Chapter 18. Template Pattern
The phrase "too many cooks in the kitchen" has been used by me a few times when examining a new code base. Whether because of time constraints or to use developers' strengths in areas where they excel, there are often times when a set of similar functionalities in development are broken up between programmers and teams. Unfortunately, this sometimes generates inconsistencies in the public interfaces of some of the programming. Superiorly architected code bases dictate base classes to build individual functionality from. To create these base classes, which enforce a specific set of interfaces and behavior, the Template Design Pattern is the way to go.
Name: TemplateThe Template Design Pattern creates an abstract object that enforces a set of methods and functionality that will be used in common by child classes as a template for their own design. |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access