the interfaces that you'll provide to the client side. But you have not yet decided
whether the business rules will be fully implemented as stored procedures
or in the java code. Which design pattern you should use to mitigate this concern?
Option 1 Business Delegate
Option 2 Facade
I picked Facade and it was wrong why ? Can't you accomplish the same thing using facade ?
You can do that using facade. But when you look at J2EE design patterns architecture, it is recommended to use a Business Delegate to access SERVER SIDE apps. This will help clean separation of V from M and C of the MVC pattern. Facade and Business delegate have almost the same functionality but Business Delegate is the J2EE pattern to go with.
Correct me if i am wrong.
Ram Dhan Yadav K
use a Business Delegate to reduce coupling between presentation-tier clients and business services. The Business Delegate hides the underlying implementation details of the business service , such as lookup and access details of the EJB architecture.
This pattern may be used to create Business Delegate's Service Locator, hiding the details of implementation
A Business Delegate may act as a proxy , providing a stand in for objects in the business tier
Business Delegate may use the Adapter Pattern to provide coupling for disparate systems
A Business Delegate performs the role of a broker to decouple the business tier objects from the clients in the other tiers
I think I fooled myself by thinking that I could do that using Facade but it is not the standard way of doing it !
Another tricky one
use a session bean as a facade to encapsulate the complexity of interactions between the business objects participating in a workflow . The session facade manages the business objects , and provides a uniform coarse-grained service access layers to clients
Session Facade is based on it.
One of the strategies for the business component in the Session Facade pattern is to use the DAO.
Session Facade can use this pattern to reduce the code complexity and exploit the benefits offered by the Service Locator.
Session Facade is used by Business Delegate when the client requests access to business services .The Business Delegate proxies or adapts the client request to a session Facade that provides the requested service.
Session Facade performs the role odf a broker to decouple the entity beans from their clients.
Quotes are from the great bookcalled Core J2EE Patterns . I just bought it and started to read it few hours ago.
[ January 08, 2002: Message edited by: ersin eser ]
Heres the link:
They even have an active mailing list.