Java Architect

May 9, 2006

J2EE patterns: Business Delegate

Filed under: J2EE patterns — nikhilb020875 @ 5:23 am

here is what i found from one of the mailing lists:

Business Delegate is used to reduce the coupling between clients (usually presentation layer components) and the business services (especially distributed business components). Most importantly you will need business delegate when you want to hide the complexity of accessing the business services (lookup..etc) and you may eventually incorporate client-side caching, and you can convert the low-level exceptions (RemoteException, Look up exceptions) into application level exceptions which are more meaningful to the client. In a way, you can assume Business Delegate is a client side Session Facade.

Think of Business Delegate when :

  • presentation tier components interact directly with business services (usually distributed)
  • It is desirable to minimize coupling between presentation-tier clients and the business service, thus hiding the underlying implementation details of the service, such as lookup and access.
  • When you want to implement caching mechanisms for business service information
  • When it is desirable to reduce the traffic between client and business services.
  • When you want to shield the clients from possible volatility in the implementation of business service API
  • When you want to implement re-try mechanisms (some times service may not be accessible in one go, in this case , before letting client know about this, you can keep the logic of re-trying here..)
  • When you need to hide remoteness (Location transparency from client perspecive)

Blog at WordPress.com.