A session facade is a pattern whose main function is to shield the client from teh complex business processing which might be remote or local
Thus it serves as another layer of abstraction .
For eg A session bean (EJB) is an example of session facade
It explicitly does not reduce traffic because the client still makes only one remote call , to the session facade but the complexity is reduced since the session facade exposes the simple interface to the business processing to the external client .
So it simplifies things for client not necessarily reducing the traffic
However coupled with VOs they can result in reduction of traffic. FOr eg a session beans method's input paramters can be VOs
Catch You Later Shiva
Joined: Jul 13, 2004
Agreed with what you have said about Facade. When you consider a work flow like system(a facade calling mulitple EJB's) would not the Session Facade be reducing the number of network calls i.e network traffic ? If a session facade is not available won't the client have to make multiple method calls to the EJB tier to accomplish the same task ?
I've come across in Wrox J2EE programming(Volume II) that reducing the network traffic/number of calls is one of the advantages of Facade pattern.
Joined: Aug 12, 2004
Yes , thats partially true .
But the main reason for using session facade to provide network transparency .
If we are required to choose between VO and facade then defintely Vo more fits the role of resucing network traffic
And i guess the qs says "normally" and when designing a session facade reducing network traffic is not the main goal
Its just one of those ambiguous qs where we have to go for the best answer i guess . Thankfully number correct ans will be speciifed in the exam
This is not a great answer to your question... but as Facade is not on the syllabus, it ought not to be a correct answer to a "fair" question for the SCWCD. This is regardless of what the qualities of the Facade pattern might be.
Joined: Jul 13, 2004
A similar one
_________ pattern provides a layer between clients and subsystems of a complex system; shields clients from subsystem components, making the subsystems easier to use Singleton Facade Business Delegate Template Method
Can anyone take a shot at this one ? Would the exam have such questions ?