JaiswalTraining

Get the online training



Corejava Servlet Jsp  Php  Hibernate  Ajax Web Service   Ejb2.1 Ejb3.0 Struts Struts2  JPA Spring Ibatis   JSF    JSF2.0  CoreJavaDesignPattern    Jquery  Flex J2EE-Design-Patterns  Jboss7  Maven  Contact Me                                                                                                                                                                        
            IGNOU SMU PTU Project                                           Training                                                                                                                              
              

Contact Us  0091- 9210721663         jaiswaltraining@gmail.com




Corejava
Servlet
Jsp
Php
Hibernate
Ajax
Web Service
Ejb2.1
Ejb3.0
Struts  
Struts2
JPA
Spring
Ibatis
JSF
JSF2.0
CoreJavaDesignPattern
Jquery
Flex
J2EE-Design-Patterns
Jboss7
Maven







Business Delegate
  • Context
    • The system exposes the entire business service API to its clients, often
      across the network.
Problem and Forces
    • Presentation-tier clients need access to business services directly
      exposing underlying implementation details
    • Business services APIs may change as business requirement changes so
      we need to minimize coupling between presentation-tier clients and the
      business service
    • Need to reduce network traffic between client and business services and
      provide caching mechanism to improve performance
    • Different clients, such as devices, Web clients, and thick clients, need
      access to business service
Solution

  • Use a Business Delegate to reduce coupling between presentation-tier
    clients and business services.
  • Provide abstraction and so hids the underlying implementation details of
    the business service, such as lookup and access details of the EJB architecture
  • The Business Delegate will be responsible for:
    • Handling the Exceptions from business services
    • Transparently performing any retry and recovery operations necessary in
      the event of service failure without exposing it to client
    • Improving performance by caches results and reference to remote
      business services
Structure

Class diagram representing Business Delegate Pattern


• Participants and Responsibilities

  • Sequence diagrams that illustrate typical interactions for the Business Delegate pattern




Strategies

  • Delegate Proxy strategy
    • provides proxy function to pass the client methods to the session bean
      it is encapsulating
    • cache any necessary data, including the remote references to the session bean's home or remote objects to improve performance by reducing the number of lookups.
  • Delegate Adapter strategy
  • E.g. in B2B environment, disparate systems may use an XML as the integration language. Integrating one system to another typically requires an Adapter [GoF] to meld the two disparate systems
Consequences
  • Reduces Coupling, Improves Manageability
  • Exposes Simpler, Uniform Interface to Business Tier
  • Performance improvement through caching
  • Translates Business Service Exceptions
Related Patterns
  • Service Locator
    • The Service Locator pattern may be used to create the Business
      Delegate's Service Locator, hiding the implementation details of any business service lookup and access code.
  • Proxy [GoF]
    • A Business Delegate may act as a proxy, providing a stand-in for objects in
      the business tier.
  • Adapter [GoF]
    • A Business Delegate may use the Adapter pattern to provide coupling for
      disparate systems.