This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
When you create a session facade, you are trying to use one session bean to abstract interactions of several session beans / entity beans.
In other words, you will find that there are few interactions are very related in nature, and you probably want to make one session facade to include these. While you may need to create another session facade to address other related interactions.
One of the problem I find with poorly designed session facade is that they have one session facade and put everything in that.
You see methods like this getItemPrice, getShoppingCartCheckOutPrice, and getFinalizedBiddingPrice. The freaking long method name just annoy and it hurts code readibility. However, if you have 3 session facade, ItemService, ShoppingCartService, and BiddingService. Each of these session facade has one method called getPrice. In terms of usability, the latter approach is better.
Therefore, all comes down to complexity of your application. Sometimes, your system makes sense to be described using 1 session facade.
[ July 01, 2005: Message edited by: Jeremy Hsu ] [ July 01, 2005: Message edited by: Jeremy Hsu ]
Joined: Jun 19, 2005
Thanks a lot. I have already submitted my assignment and luckily made a decision that was somewhat similar to your ideas Going to take part III on Monday. [ July 02, 2005: Message edited by: Shahid Afridi ]