8.2. UML
This Unified Modified Language (UML) diagram details a class design using the Façade Design Pattern (see Figure 8-1).
Figure 8-1. Figure 8-1
For this diagram, note the following:
The MyObject class contains a public method called doSomethingRequiresAandB(). This is just one step in the execution of the MyObject class. doSomethingRequiresAandB() creates a new instance of the object LogicFacade. It calls the public method named callRequiredLogic(), which is named abstractly enough for MyObject.
The callRequiredLogic() method inside the LogicFacade class is then responsible for creating an instance of LogicObjectA and calling the doSomethingA() method. It also is responsible for creating an instance of LogicObjectB and calling the doSomethingB() method.
All of these actions are passed back through the LogicFacade class so that they are available to MyObject.
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