Design Patterns Java™ Workbook

(Michael S) #1
Chapter 4. Facade

Summary........................................................................................................................................................


Ordinarily, you should refactor the classes in a subsystem until each class has a well-defined
purpose. This will make your code easier to maintain, but it can also make it difficult for
a user of your subsystem to know where to begin. To help the developer who is using your
code, you can supply demos or facades that go with your subsystem. A demo is usually
a stand-alone, nonreusable application that shows one way to apply a subsystem. A facade is
usually a configurable, reusable class with a higher-level interface that makes the subsystem
easier to use.

Free download pdf