Join Now
|
Login
home
login
join now
products and pricing
design pattern framework
javascript pattern framework
database pattern framework
adaptive data models
design patterns
javascript tutorial
sql + database tutorial
all tutorials
connection strings
visual studio shortcuts
c# coding standards
html color codes
all references
explore
questions
ask question
tags
users
contact us
training courses
schedule
registration
sitemap
about us
training and education for professional developers
login
join now
C#, ASP.NET, WPF, WCF, LINQ, PATTERNS
Home
Questions
Question
« Prev Topic
|
Next Topic »
Best Pattern for DAO
Daniel Hicks
60
94.5
Mar 07, 2011
0
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...
Design Pattern
DAO
Add Comment
Flag
Follow
Email
1 answer
answer date
votes
comments
Rajesh Pillai
1,284
100.0
Mar 08, 2011
0
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 :).
Add Comment
Flag
Link
Write Your Answer
return to top