Originally posted by Scheepers de Bruin:
DAO encapsulates database operations so that there is a uniform way of getting the database to do stuff. This data layer is therefore reusable. Another advantage of this modularity is that any frontend that knows how to use this uniform way can tap into the database.
And in fact you can write DAO's that don't work on a database but on XML, flat files or a myriad of other persistence mechanisms. Your business logic doesn't even to know, you just give it a new DAO implementation to collaborate with.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus