Search This Blog

Business Delegate Design Pattern in Java

The Business Delegate pattern adds an abstraction layer between presentation and business tiers. By using the pattern we gain loose coupling between the tiers and encapsulate knowledge about how to locate, connect to, and interact with the business objects that make up the application.

Business Delegate Pattern is used to decouple presentation tier and business tier.

Let's discuss how Business Delegate Pattern decouples presentation tier and business tier with a class diagram and source code.

This pattern is divided into a number of sections for simplicity like problem, forces, solution etc.

Table of contents

Problem

Forces

Solution

Structure - Class Diagram, Sequence Diagram

Participants and Responsibilities

Implementation

Consequences

Applicability

References

Problem

(Problem section describes the design issues faced by the developer)

You want to hide clients from the complexity of remote communication with business service components.

Forces

(This section describes Lists the reasons and motivations that affect the problem and the solution. The list of forces highlights the reasons why one might choose to use the pattern and provides a justification for using the pattern)

You want to access the business-tier components from your presentation-tier components and clients, such as devices, web services, and rich clients.

You want to minimize coupling between clients and the business services, thus hiding the underlying implementation details of the service, such as lookup and access.

You want to avoid unnecessary invocation of remote services.

You want to translate network exceptions into application or user exceptions.

You want to hide the details of service creation, reconfiguration, and invocation retries from the clients.