23.5. Conclusion of the External Services with Varying Interfaces Problem

A combination of Adapter, Factory, and Singleton patterns have been used to provide Protected Variations from the varying interfaces of external tax calculators, accounting systems, and so forth. Figure 23.7 illustrates a larger context of using these in the use-case realization.

Figure 23.7. Adapter, Factory, and Singleton patterns applied to the design.


This design may not be ideal, and there is always room for improvement. But one of the goals strived for in this case study is to illustrate that at least a design can be constructed from a set of principles or pattern “building blocks,” and that there is a methodical approach to doing and explaining a design. It is my sincere hope that it is possible to see how the design in Figure 23.7 arose from reasoning based on Controller, Creator, Protected Variations, Low Coupling, High Cohesion, Indirection, Polymorphism, Adapter, Factory, and Singleton.

Note how succinct a designer can be in conversation or documentation when there is a shared understanding of patterns. I can say, “To handle the problem of varying interfaces for external services, let's use Adapters generated from a Singleton Factory.” Object designers really do have conversations that sound like this; using patterns and pattern names supports raising the level of abstraction in design communication.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.247.219