Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Design Pattern - Business Delegate

I've got some questions regarding Java design patterns. I want to know what the lookup service and the business service in the business delegate pattern are exactly used for. I appreciate as much details and information as possible.

like image 324
Emiswelt Avatar asked Dec 18 '22 02:12

Emiswelt


2 Answers

The business delegate pattern tries to decouple the clients from the business services. To achieve this you need:

  • business delegate that is the object used by clients to request for services;
  • lookup service is a bridge used by business delegate to search for services, it encapsulates the search algorithm according to the request made by the delegate;
  • business service is the actual service that is offered to clients, usually an EJB or similar J2EE concepts.

By the way this page explains everything quite clearly..

like image 127
Jack Avatar answered Dec 19 '22 15:12

Jack


The Business Delegate acts as a client-side business abstraction; it provides an abstraction for, and thus hides, the implementation of the business services.

Using a Business Delegate reduces the coupling between presentation-tier clients and the system's Business services

A Business Delegate uses a component called the Lookup Service. The Lookup Service is responsible for hiding the underlying implementation details of the Business service lookup code.

The Business service is a business-tier component, such as an enterprise bean or a JMS component, that provides the required service to the client. It is used to invoke the business methods on behalf of the client.

Structure:

enter image description here

You can find more details about this pattern in oracle website.

like image 45
Ravindra babu Avatar answered Dec 19 '22 15:12

Ravindra babu