Two Laptop Bag
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Facade pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Facade pattern" Watch "Facade pattern" New topic

Facade pattern

Siddharth Mehrotra
Ranch Hand

Joined: Aug 21, 2001
Posts: 185
i have being going through the post, and some people have tried or implemented facade pattern for the client gui. i went and read through the design patterns book and got the idea for facade pattern. I feel that its an interesting prospect to implement Facade Pattern for the clinet GUI part.
But can anyone tell me as to what have they done to implement that. i mean some design idea.
so that i can have a start at that

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Well we know we have an interface that has all the public methods of the Data class, so we could make a class that takes an instance of this interface in it's constructor. Then we can make really nice methods that calls the interface methods to do our "Booking", "Searching", et al. So now all the client needs is an instance of this new class, which will have a reference to an interface, which might end up being either local or remote mode. But the client never has to know this.
Hope that leads you down the path.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Siddharth Mehrotra
Ranch Hand

Joined: Aug 21, 2001
Posts: 185
hi mark,
Thanks buddy, I had to wait very long for some sight on this matter.
I just need one last favour from you.
i have posted my design also on this board.
I would like to have some reviews from you on it.

It will be a great help.
Thanking you in anticipation.
I agree. Here's the link:
subject: Facade pattern
jQuery in Action, 3rd edition