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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Problem understanding usage pattern of DataProviders, ServiceProviders and Controller ClassesProblem understanding usage pattern of DataProviders, ServiceProviders and Controller Classes
Previous
 
Next
New Post
5/25/2008 8:45 AM
 

The first service in DNN I explored for customization was the Role Service. That service has RoleController under Security in Components, a DNNRoleProvider in a separate project named Provider.Membership.DNNProvider and a DataProvider again in a separate project named Provider.Membership.DataProvider.

The norm here is that the UI CodeBehinds call the RoleController, which uses the DNNRoleProvider which in turn uses the DataProvider, i.e. an architecture something like:

Controller -> ServiceProvider -> ServiceDataProvider

However, in the case of Caching service, it is the BPCachingProvider that uses CachingController which uses the DataProvider, i.e.

ServiceProvider -> Controller -> ServiceDataProvider

Now, which way it should be? Should controller use ServiceProviders, or ServiceProviders should use Controllers??

In majority of the cases (Role, Profile, Membership), I have observed that it is the Controller that calls the ServiceProvider. So, why an exception in Caching Service?

 

One more thing I have observed is that there is a common DataProvider for multiple services (e.g. Membership, Profile & Role Provider share the same Abstract & Concrete DataProvider). Shouldn't there be separate Abstract DataProviders for each service. e.g. I want to customize how the Lists are handled in the database (whose abstract methods are present in the main DataProvider class of DNN), but have no option but to handle Portal, Tab, SearchEngine, Files & a hec lot of other Methods that I dont want to play with???

Would it be a good idea to inherit from the main SqlDataProvider of DNN, override List Handling methods & leave the other ones upto the base class???

 
New Post
5/25/2008 2:23 PM
 

It seems as if you want to make changes to the Core. Are you sure you want to do that? The problem is you will create a site that wont upgrade.

As far a "why" some things are like they are. Part of the reason is that the project has been going on for 5 years through asp.net 1.1 to asp.net 2.0+



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
5/26/2008 12:21 AM
 

And exactly for avoiding that (making changes to the core), I thought of inheriting the existing DataProvider or Provider classes, then override whatever methods I wanted, and leave the rest to the base implementation.

Part of the reason I need to do this, is because DNN segragates portals from each other completely, and I have a situation where I need to share some data between portals (like Lists, Profiles etc.). I have also created another thread on a related problem:

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/111/postid/230004/scope/posts/Default.aspx

Also, the Provider architecture of DNN allows the Service Provider (e.g. DNNRoleProvider) to be replaced through web.config, but not the DataProvider. Would it be possible to just replace the DataProvider (e.g. the SqlDataProvider implementation for Profile service of DNN) without touching the ServiceProvider or the Core Code.

The reason I dont see this to be possible, because in the following CreateProvider() method of  Security.Membership.Data.DataProvider

        Private Shared Sub CreateProvider()
            objProvider = CType(Framework.Reflection.CreateObject(ProviderType, ProviderNamespace, ProviderAssemblyName), DataProvider)
        End Sub

the Provider namsespace & assembly name are hardcoded to be DotNetNuke.Security.Membership.Data from the same assembly???

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Problem understanding usage pattern of DataProviders, ServiceProviders and Controller ClassesProblem understanding usage pattern of DataProviders, ServiceProviders and Controller Classes


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