I am going through the book EJB design patterns by Floyd Marinescu ,which i downloaded from http://www.theserverside.com .I am unable to distinguish between Session Facade and DTO Factory design patterns .
Can anyone who has gone through these design patterns ,help me out. Thanks in advance .
Before EJB, the Facade pattern provided a simple, unified API to clients so that clients didn't have to know about the swarm of busy little implementation objects that might be inside a component. With EJB, the Session Facade does all that plus it provides the remote interface for clients and can use all the features of the EJB container - security, transactions, etc. And it can be a stateful bean if you like. A lot of people like to have a very few Session Facade beans and use Plain Old Java Objects behind them. The POJOs can have minimal or no dependency on the container, making them simpler, easier to test and easier to reuse.
I haven't read up on DTO factory but from the name, I'd say it just creates DTOs.
Do those sound different enough?
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Joined: Feb 01, 2007
Stan ,thanks for the reply .
subject: Difference between DTO factory and Session Facade