Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...DAL design questionDAL design question
Previous
 
Next
New Post
2/28/2009 4:59 PM
 

 I need to design a Data access layer DAL .Net Enterprise library version 3.5 Data access application block (DAAB) In my application,I've various logical modules like Registration, billing, order management, user management,etc Am using C# business entities to map the module objects to database tables and then return the List collection to the client.

I would like to design my DAL in such a way that if tomorrow we decide to use some other data access framework we should have minimal code change. Given this, how do i design my class structure? I thought I would have a class DbManagerBase which would be a wrapper over existing .net DAAB This class DbManagerBase would implement an interface called IDbManagerBase which would have public methods like ExecuteReader, ExecuteNonQuery, etc.

The client class ie. RegistrationDAL,UserManagermentDAL would have the following code inside each of its methods: IDbManagerBase obj= new DbManagerBase() obj.ExecuteReader(myStoredProcName) . . . is this a good OOPS design?may i know any better approach please?or do i need to use inheritance here? Can i have all the methods in DbManagerBase class and RegistrationDAL,UserManagermentDAL classes as static?I guess,if i've methods as static then the above interface code wont make any sense...right???

Thanks.

 
New Post
3/2/2009 2:41 AM
 

I would strongly recommend that you have a look at the way that this type of thing is done with existing DotNetNuke modules, as it shows this whole process for you.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...DAL design questionDAL design question


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out