• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Fascade vs DAO

 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am I confused or are Fascade and Data Access Objects nearly the same concept.
 
shai koren
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rufus,
I am afraid you are confused.
Facade's idea is to hide the complexity of the system e.g - the client doesnt need to know that you are actually calling number of other classes/resources for example getPrice can involve many calculations ( finding the item , look for discounts , add VAT , generate report?,etc...)
DAO's idea is to abstract the persistence mechanism so that specific implementations can be provided with the SQL statements (for rdbms). in the case of BMP entity beans for example, you could "switch" to classes with the appropriate specific CRUD SQL statements. I might have not expressed it clearly enough , tbut the thing to take in short is that the DAO deals with persistence issue and the Facade deals more with control and workflow.
cheers
shai
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic