Applied Design Patterns with Java
Structural :: Facade (185) {C ch 13}
Example - UML : dbFrame
Example - Java :: Patterns\Structural\Facade
Pattern Concept: to wrap a set of complex classes into a simpler enclosing interface. Facades provide a flexible way to hide complexity.
Issues and Consequences of the Facade pattern include:
The example Java program is named 'dbFrame'. Note that this examples uses an MS Access database name 'groceries.mdb', and that it requires setting up an MS Windows ODBC DSN service named 'Grocery prices' to work properly. Cooper's text (Chapter 13, pages 121-2) describes how to do this. The JDBC to ODBC interface layer is automatically installed with the JDK 1.3 or JDK 1.4 compiler. The following diagram shows the organization of the java.sql.* package.
The next diagram shows the organization of the java.sql.* package and the Facade wrapper used in the example.
The UML diagram is above, and the list of Java files is below:
Catalog