Why do we use data layers, why not make it a part of the business layer? Wouldn't it be more efficient as part of the business layer, since we don't have the additional overhead of the new classes?
Thanks.
ASP_Newbie
Don't confuse the logical design with the phyical design. Logically its good to have data access code separate, even if physically the code ends up in the same set of assemblies as the business code. The separation is good because you may want to access other data sources in the future, such as other databases, or XML files, or web services - who knows what the future holds. Therefore that data access code shouldn't muck up your business logic.
Here's a good book on the subject which is widely considered to be the authority on such matters:
VB Version:
Expert VB 2005 Business Objects
http://www.amazon.com/exec/obidos/ASIN/1590596315/steveorrnet-20/103-8899987-4030266?creative=327641&camp=14573&adid=1JQVTDBKKNVYFGAGSK6P&link_code=as1
C# Version:
Expert C# 2005 Business Objects
http://www.amazon.com/exec/obidos/ASIN/1590596323/steveorrnet-20/103-8899987-4030266?creative=327641&camp=14573&adid=1YNBYBEM7S55ZXFCZJW3&link_code=as1
I hope this helps,
Steve C. Orr,
http://SteveOrr.net
In addition, if you can use the Microsoft Enterprise Libraries' Data Access Application Block, please do yourself a favor and use it. Huge time saver.
I recently starting using the June 2005 version and I'm still kicking myself for not having used them starting 2-3 years ago (the earlier versions that is).![]()
0 comments:
Post a Comment