DAO Design patten and Session Facade pattern

Could you explain the Data Access Objects in DAO design pattern

Could to Explain Session Facade pattern with simple,is it applicable tostateless session bean ?

LVL 9
Manikandan ThiagarajanSenior consultantAsked:
Who is Participating?
 
matthew016Connect With a Mentor Commented:
The Dao layer contains the classes that contains all the SQL query's in case you work with a database, or all I/O if u work with a file, ...

Why is it used :
in case u would change of datasource and avoid refactoring in the other layers.
For example if u move from MySQL to Oracle, u don't need to change your Business Model layer, only the DAO layer that contains all the DAO classes.
In your Biz-classes u could have : daoCustomer.getInfo(); and no SQL.
0
 
Mayank SConnect With a Mentor Associate Director - Product EngineeringCommented:
0
 
KantiConnect With a Mentor Commented:
It will be a good idea to read the non-software examples before you get to the software examples
http://www2.ing.puc.cl/~jnavon/IIC2142/patexamples.htm

For Facade think of any company receptionist . They act as an interface between you and the company department you are dealing with. All you do is call the receptionist and tell her which department you need and you will then be connected .

In software too using an interface as a first point of contact to the underlying big sub sytmens will make it earlier for the client application to deal with.


The below  example for facade is explained well
http://home.earthlink.net/~huston2/dp/facade.html

http://home.earthlink.net/~huston2/dp/patterns.html
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.