| Section 13 |
|---|
| 13.1 Given a scenario description with a list of issues, select the design pattern (Value Objects, MVC, Data Access Object, or Business Delegate) that would best solve those issues. |
13.2 Match design patterns with statements describing potential benefits that accrue from the use of the pattern, for any of the following patterns:
|
13.1 Given a scenario description with a list of issues, select the design pattern (Value Objects, MVC, Data Access Object, or Business Delegate) that would best solve those issues.
13.2 Match design patterns with statements describing potential benefits that accrue from the use of the pattern, for any of the following patterns:
| Pattern | Description/Benefit/Issues |
| Value Objects |
It avoids unnecessary network round-trips by creating one-off transport objects to group together a set of related attributes needed by a client program, |
| MVC |
Cleanly separates the roles of data and presentation, allowing multiple types of client displays to work with the same business information. |
| Data Access Object |
Avoid unnecessary marshalling overhead by implementing dependent objects as lightweight, persistent classes instead of each as an Enterprise Bean. |
| Business Delegate |
A business delegate decouples business components from the code that uses them. The pattern manages the complexity of distributed component lookup and exception handling, and may adapt the business component interface to a simpler interface for use by views. |
| The following patterns are not required for the certification test. | |
| Application Service |
|
| Bimodal Data Access |
|
| Composite Entity |
Model a network of related business entities |
| Composite View |
Separately manage layout and content of multiple composed views |
| Context Object |
For example, an HTTP request parameter exists for each field of an HTML form and a Context Object can store this data in a protocol-independent manner while facilitating its conversion and validation. Then other parts of the application simply access the information in the Context Object, without any knowledge of the HTTP protocol. Any changes in the protocol are handled by the Context Object, and no other parts of the application need to change. |
| Facade |
Session entity facade is an instance of the Facade pattern. It avoids inefficient remote client access of Entity Beans by wrapping them with a Session Bean and shares its applicability. Use the Session Facade pattern when you want to provide a simple interface to a complex subsystem of enterprise beans or when you want to reduce communication & dependencies between client objects and enterprise beans. |
| Factory method |
Allow runtime instantiation of an appropriate subclass of a given interface or superclass based on externally-configurable information. |
| Fast-Lane Reader pattern |
Avoid unnecessary overhead for read-only data by accessing JDBC API's directly. This allows an application to retrieve only the attributes that need to be displayed, instead of finding all of the attributes by primary key when only a few attributes are required by the client. Typically, implementations of this pattern sacrifice data consistency for performance, since queries performed at the raw JDBC level do not "see" pending changes made to business information represented by Enterprise Beans. Improve read performance of tabular data. |
| Front Controller |
Centralize view management (navigation, templating, security, etc.) for a Web application in a single object that handles incoming client requests. |
| Intercepting Filter |
Pre- and post-process application requests |
| Page-by-Page Iterator Pattern |
Avoid sending unnecessary data to the client by breaking a large collection into chunks for display. |
| Service Locator |
Simplify client access to enterprise business services |
| Singleton |
|
| Template Method |
|
| Transfer Object |
Transfer business data between tiers |
| Value Messenger |
Keep client value object attributes in synch with the middle-tier business entity information that they represent in a bidirectional fashion. |
| Value List Handler |
Efficiently iterate a virtual list |
| View Helper |
Simplify access to model state and data access logic |
| More |
More design patterns, focusing on GOF's 23 |
A good example of these design patterns can be found from Pet Store Demo project.
There are 200+ classes in this project. See the following list to study how the design pattern has been used: