aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Facade Pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Facade Pattern" Watch "Facade Pattern" New topic
Author

Facade Pattern

Chetan Mehta
Ranch Hand

Joined: Aug 04, 2001
Posts: 40
Hi ,
Who implements Facade pattern.
(Select One)
1. EJBObject
2. EJBHome
3. Remote Interface
4. Bean Class
Regards,
Chetan Mehta
John Bateman
Ranch Hand

Joined: Mar 09, 2000
Posts: 320
Originally posted by Chetan,Mehta:
Hi ,
Who implements Facade pattern.
(Select One)
1. EJBObject
2. EJBHome
3. Remote Interface
4. Bean Class
Regards,
Chetan Mehta

Hi
These classes don't actually 'implement" a Facade pattern in the classic sense of Java. (I.E. public class SomeObject implements Facade {})
An example of a facade:
If I was working on an application that had 3 tiers (presentation / business and data), then I might want to make working with the EJB's on the data tier easier for the guys programming the business tier. One (of many) tactics could be instead of the business tier doing all the JNDI lookups and instantiating the EJB objects (create etc), I could create a Facade that acts as the glue between the busines and data layer. Then all calls to the EJB would be made through the Facade instead. It would look like regular method calls to a 'normal' java object, but inside the facade would have all the bells and whistles to get my EJB objects.
If you are going to get into design Pattens I sugest picking up one of the books discussed in the bunk house on this site. I also subscribe to the j2EE-Patterns Interest mailing list. It's very informative on this subject.
I hope this at least points you in the right direction to begin with.

SOURCE CODE should be SURROUNDED by "code" tags.
ruilin yang
Ranch Hand

Joined: Feb 25, 2001
Posts: 334
John,
Would you please tell me how to subscribe to the j2EE-Patterns Interest mailing list.
Thanks,
Ruilin
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
ruilin:
http://forums.java.sun.com/forum.jsp?forum=92


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Manjunath Reddy
Ranch Hand

Joined: Jul 26, 2001
Posts: 60
Basically session facade pattern is used to wrap business use-cases, in the sense, a particular business case method which might involve one or many ejb's is fulfilled through the session bean by using the sessionfacade pattern.
Session facade is an abstract architecture term to define this kind of encapsulation.
Hence any object that implements sessionBean is the one that implements(tho not the right word to use) session facade.
thx,
mpr
 
Consider Paul's rocket mass heater.
 
subject: Facade Pattern