This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I'm still reading Core J2EEPatterns and I have another doubt I couldn't find anwser for in the forums: Having a Business Delegate and a Session Façade, what's the use of a Application Service? I thought encapsulating business tier objects was already Session Façade's responsibility, isn't it?
Thank you very much!
I feel there must be far better ways to do what I do... that makes learning even funnier
Good question. Typically, a Business Delegate is on the Presentation tier. The Session Facade is on the Business tier. These guys communicate with each other.
For example, you would have a reference to a Business Delegate in your web servers. A Controller would get this reference to send commands/data to Business tier. Business Delegate would then have reference to Session Facade, so forth and so on...
The only reason you might have a Business Delegate on the Business tier would be if there was another system on other machines. The delegate would then be used to get to this system and send commands/data...
Joined: Aug 07, 2008
Thank you very much. But I still don't see where to put the Application Service. In the architecture you describe there's not Application Service and we don't feel something's missing, so when to use it? I mean the Application Service, not the BusinessDelegate or SessionFaçade.
Joined: Apr 16, 2008
I don't remember the details of the Application Service design pattern and have never attempted to use this pattern. Keep in mind that not all three-tier applications will use all of the patterns in existence. Moreover, many patterns in general have overlapping or similiar characteristics.
Basically, the Application Service pattern provides a different or other way to organize/design the Business tier components. As with many things in software design, there are many, many "correct" ways to do things. A lot will be influenced by "your" personal style and experience, when it comes to making design decisions.