HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Is it just me or are data providers done wrong?Is it just me or are data providers done wrong?
Previous
 
Next
New Post
10/10/2006 8:30 PM
 

Hey all - I'm trying to understand the basic architecture of DNN and am wondering if I am off base with how I understand the data provider model to work.  From what I can tell EACH module has a specific data provider implementation in addition to the abstract dataprovider class.  Unless I'm missing something this seems really messed up - For instance I would LOVE it if DNN ran on MySql but it doesn't - so if someone wants to run a DNN site on MySQL, they would have to add MySql data providers in all modules?   If this is the case, this just seems horribly wrong - it would be MUCH better if we had the data providers centralized and then all modules would point to a generic common abstract class - so one could add/change data providers on the entire system without having to modify or add code to existing modules.  The way it stands right now, it seems like it'll take a hell of a lot of effort to get another provider simply because one would have to touch all the core modules.  Am I missing something?

Bob

 
New Post
10/11/2006 12:03 PM
 


Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
11/3/2006 9:51 AM
 

Bob,

I think you are right ON base.  There is lot done to separate and abstract the data access.  That works great.  It does add complexity, but with templates and code generators it really isn't all that hard.

I don't see how Michael Washington's description of the DAL and DAL+ explain how it is possible to have modules that don't have separate code for each dataprovider.  Granted that code will not have to be sprinkled throughout the BLL code.  But at some point it eventually calls a stored procedure.  The two big problems are:

1.  What happens with databases that don't support stored procedures?

2.  You have to write those stored procedures for each provider for your specific module? 

so if I want to use an oracle provider then every module I use has to come with an install, that will create the tables and stored procedures necessary to add update, get... the data for that module. 

To really make it dataprovider swappable then the install would have to take some sort of generic stored procedure definitions and then the provider would translate those into the form required for it's mother database.  Then the modules don't need to know anything about the database.  All they need to know is what the dataprovider needs to get its job (of talking to the database) done.

Then ya really got somethin.

I'm with you Bob.

mj 

 


Michael Jackson
Brillnat.com
Custom module development
Database access tokenized HTML modules
 
New Post
11/4/2006 6:11 AM
 
I think this might work well for simple or small modules, but I am focusing on large DNN installations and making sure my modules are scalable. With scalabilty I think you have to move some of the logic into the DB - it would just be too inefficient in the BL -

An example: In my UserGroups module, I want to get a random module for a Featured Group page. If was using the generic approach youare proposing then I would call my generic CRUD procs and do the get random in the BL, but for scaleabilty I would actually make do the random lookup in the the stored proc. This then causes problems when you want to move to a different DB (not all functions supported perhaps).

So, while I think this approach would work for simple modules, it would not work for more complex, high-throughput modules.


Thanks,
Rodney
Smart-Thinker - Home of SmartSocial - the 100% Free DotNetNuke Social Networking Product Suite
Do use DNN a lot? Try the DotNetNuke Toolbar to save you time!
PokerDIY - Example Implementation of DNN Social Network
 
New Post
11/4/2006 6:21 AM
 
rsriley wrote

it would be MUCH better if we had the data providers centralized and then all modules would point to a generic common abstract class - so one could add/change data providers on the entire system without having to modify or add code to existing modules. 

see:

Converting the DotNetNuke® Survey module to use the DAL+ (in VB and C#)



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Is it just me or are data providers done wrong?Is it just me or are data providers done wrong?


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Try An Online Demo
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

DotNetNuke Scoop!

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft .NET. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates Snowcovered.com where users purchase third party apps for the platform.