Part 1 of 6 · 1 min read
Why this page comes second
In this module you will
- Say what a product family is and why mixing families causes bugs.
- Write an abstract factory with two concrete factories in Java.
- Show how switching a whole family needs one change.
- Name the main weakness: adding a new kind of product.
- Tell Abstract Factory from Factory Method and from a simple factory.
Module 1 made one object at a time. Many programs must make several objects that only work well together, such as a tax rule and a money format for one country. The source is "Design Patterns" (GoF), chapter 3, with "Clean Architecture" (CA), chapter 11, for its role in dependency inversion. Code was compiled and run before it was written here. Numbers marked "made up" only show the idea.