Design Patterns Business Delegate Pattern - Design Patterns

What is Design Patterns Business Delegate Pattern?

Business Delegate Pattern is used to decouple arrangement tier and business level. It is mainly use to decrease communication or remote lookup functionality to business tier code in arrangement level code. In business level we have following entities.

  • Client - Presentation tier code may be JSP, served or UI java code.
  • Business Delegate - A single entry point class for client entities to provide access to Business Service methods.
  • Lookup Service - Lookup service object is responsible to get relative business implementation and provide business object access to business delegate object.
  • Business Service - Business Service interface. Concrete classes implement this business service to provide actual business implementation logic.

Implementation

We are going to create a Client, BusinessDelegate, BusinessService, LookUpService, JMSService and EJBService representing different entity of Business Delegate patterns.

BusinessDelegatePatternDemo, our demonstration class, will use Business Delegate and Client to display use of Business Delegate pattern.
business_delegate_pattern_uml_diagram

Step 1

Create Business Service Interface.

BusinessService.java

Step 2

Create concrete Service classes.

EJBService.java

JMSService.java

Step 3

construct Business Lookup Service.

BusinessLookUp.java

Step 4

Create Business Delegate.

BusinessDelegate.java

Step 5

Create Client.

Client.java

Step 6

Use Business Delegate and customer classes to display Business Delegate prototype.

BusinessDelegatePatternDemo.java

Step 7

Verify the output.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Design Patterns Topics