Core J2ee patterns, session facade: always useful

admin 1

Any non-trivial EJB-based application should incorporate the session facade design pattern, since the overhead to implement it is negligible and the benefits are great, as can be read on e.g. java.sun.com:

Many business processes involve complex manipulations of business classes. Business classes often participate in multiple business processes or workflows. Complex processes that involve multiple business objects can lead to tight coupling between those classes, with a resulting decrease in flexibility and design clarity. Complex relationships between low-level business components make clients difficult to write.

The Session Facade pattern defines a higher-level business component that contains and centralizes complex interactions between lower-level business components. A Session Facade is implemented as a session enterprise bean. It provides clients with a single interface for the functionality of an application or application subset. It also decouples lower-level business components from one another, making designs more flexible and comprehensible.

The pattern basically boils down to the introduction of a session facade bean, that on the one side interfaces with the client side, and on the other side communicates with the (complicated) business logic.

More detailed information can be found in:

One thought on “Core J2ee patterns, session facade: always useful

Comments are closed.

Next Post

Article on ANT 1.6 - features for Task Writers

Facebook0TwitterLinkedinAn interesting article appeared on OTN today: ANT 1.6 for Taskwriters. This article will show you that Ant 1.6 has also changed internally and how you can take advantage of those changes when you write a task or even a library of tasks. Furthermore, the article contains a lot of […]