Business delegate pattern

From Wikipedia, the free encyclopedia

Business delegate is a Java EE design pattern. [1] This pattern is directed towards reducing the coupling in between business services and the connected presentation tier, and to hide the implementation details of services (including lookup and accessibility of EJB architecture).[1][2] Business delegates acts as an adaptor to invoke business objects from the presentation tier.[3]

Components

Requests to access underlying business services are sent from clients, and lookup services are used by business delegates to locate the business service components.[1]

Basic components are Business delegate, Lookup service and business service.

Business delegate

Control and protection are provided through business delegate which can have two types of structures, without ID and with ID, where ID is a string version of the reference to a remote object such as EJBHome or EJBObject.[1]

Lookup service

Business service is located by lookup service which is used by the business delegate. The implementation details of business service lookup is encapsulated by lookup service.[1]

Business service

This a business-tier component, such as an enterprise bean or a JMS component, which provides the required service to the client.[1]

Consequences

Some consequences are as follows:

  • More flexibility and maintainability as intermediate business delegate layer decouples the business layer from the presentation layer.
  • Business delegate exposes a uniform API to the presentation tier to access business logic.[1][3]

Concerns

Following concerns can be considered:

  • Maintenance due to the extra layer that increases the number of classes in the application.
  • Business delegate should take care of the changes of the remote business object interfaces, and these types of changes are rare.[3]

Sample code

See also

References

Related Articles

Wikiwand AI