Dofactory.com
Dofactory.com
 Back to list
Views:   9.7K
Replies:  1
Archived

Best Pattern for DAO

What is the best pattern for the DAO?  Is it best to create an Abstract Factory that returns an abstract DB connection object for instance?  Everybody seems to have different opinions... 
Daniel Hicks, Mar 07, 2011
Reply 1
I would prefer to go with Enterprise data block from P&P as most of the plumbing code is done there and extend my apps further. 

But to answer your question , if you are building a DAO from scratch then you will find yourself moving towards Abstract Factory to take care of multiple providers and multiple return types.

You may also have a look at the Provider model which is a combination of multiple patterns and implement your own DAL using this....

http://msdn.microsoft.com/en-us/library/ms972319.aspx

Also, now Entity Framework (which again is based on a combination of basic patterns) is available which is a good option as well.  So, you see, there cannot be one answer :).






Rajesh Pillai, Mar 08, 2011
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.