Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Facade Pattern

 
Chetan Mehta
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
Who implements Facade pattern.
(Select One)
1. EJBObject
2. EJBHome
3. Remote Interface
4. Bean Class
Regards,
Chetan Mehta
 
John Bateman
Ranch Hand
Posts: 320
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John,
Would you please tell me how to subscribe to the j2EE-Patterns Interest mailing list.
Thanks,
Ruilin
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ruilin:
http://forums.java.sun.com/forum.jsp?forum=92
 
Manjunath Reddy
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic