Java Reference
In-Depth Information
• Developers need to know and remember a lot of configuration parameters and
Business Delegate
The page controllers form the boundary classes for the presentation tier in any Java EE
application. It is possible for the page controllers to directly invoke the business compo-
nents. This makes the presentation tier code tightly coupled with the business tier code.
In most cases, the business service components are available as remote objects like
stateless session beans (SLSBs). In such cases the page controller also needs to take care
of the infrastructure services such as JNDI lookup, handle remote exceptions, and so on.
In due course it becomes increasingly difficult to maintain these page controllers
because they handle multiple responsibilities.
• Minimize coupling between the presentation tier and the business tier.
• Hide infrastructure issues from the business service clients.
Use a business delegate to act as an adapter to invoke business objects from the
presentation tier.
Strategies with the Spring Framework
Famous computer scientist Butler W. Lampson (who envisioned the modern personal
computer at Xerox way back in 1972) once said, “All problems in computer science can be
solved by another level of indirection.” This principle can be applied to put together a
thin layer between page controllers and the EJB business layer. The sole purpose of this
Search WWH ::

Custom Search