Core J2EE Pattern Catalog

© CoreJ2EEPatterns
All Rights Reserved.

Last Updated:
January 29, 2006 8:54 PM


In Association with Amazon.com

Design Note: Service Facade

In enterprise applications that use EJB components, Session Façades provide the Facade [GoF] implementation in the business tier using session beans. These facades are meant to encapsulate and expose business behavior in a coarse-grained manner to the application clients and hide the complexities of business components and their interactions. However, when you design enterprise applications that do not use EJB components, you still need to provide a behavior similar to the Session Façades. But, instead of using session beans, we use POJOs to implement the facades, hence the term POJO Facades.

In order to provide a common vocabulary to discuss both POJO Facades and Session Façades, we introduce the term service facades. Service facades are business-tier facades that are implemented either as POJOs or session beans. Thus when you see the term service facade, we use it to indicate either a POJO Facade or a Session Façade. The figure below illustrates these relationships.

Also see Entity Facade.

Figure: Service Facade Class Diagram

Contact Us © CoreJ2EEPatterns.com. All Rights Reserved. Terms of use