• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help me!!Mark,pert and all friends!

 
sparkle zou
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is Facade?
Is it use in client!
Can you be kind enough to tell me how to implement it??
Thank you very much!!
 
Ben Ritchie
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To quote Design Patterns, a Facade defines a higher-level interface that makes a subsystem easier to use.
One way to book seats would be to give the Client a reference to the database, and get it to call the lock, modify, unlock etc. methods. Alternatively, you could wrap Data in a Facade which had a simple bookSeats(...) method - internally this method would contain the same set of calls to Data to do the booking, but the details of how the booking is done would be hidden from the Client. That simplifies the Client and if the database changes then only the Facade needs to change.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic