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

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...What is Controller,Info,Dataprovider and sqldata provider in DNNWhat is Controller,Info,Dataprovider and sqldata provider in DNN
Previous
 
Next
New Post
3/7/2011 1:36 AM
 
Hi All,

                                Please tell me what is Controller,Info,Sqldataprovider and dataprovider.
 
New Post
3/7/2011 4:23 AM
 
These patterns are part of the standard Object-Relational model mapping in DotNetNuke and DotNetNuke modules.

Controller is a class suffix used to declare 'doing' actions on entities. This is usually database interactions like 'add', 'delete', 'update', but might also be thing like calculating values or doing other processing. It can be thought of as a business-layer class which largely wraps the database layer.

DataProvider is a singleton pattern class which is used to define all the database - layer interactions for a given module. It's the central point for definining all the database activity for a module. Note that DataProvider is implementation agnostic in design - it doesn't specify that the data necessary will be saved by Sql Server.

SqlDataProvider is an implementation specific provider which implements all the methods of the DataProvider. In theory you could build an OracleDataProvider or a MySqlDataProvider but in practice people rarely do. The SqlDataProvider layer contains the actual Sql-specific implementation of the database calls.

Info is a class suffix denoting an entity., Typically this is the database table defined as a class, so you might have UserInfo, TabInfo and if you are creating your own module, WidgetInfo.

Note that you don't have to use any of these patterns when building a module, but best practice dictates that you follow the style of DotNetNuke modules when implementing your own modules. You could theoretically code database interaction directly into your code-behind pages if you wanted. Most people prefer to follow the patterns in the rest of DotNetNuke just so the entire codebase has the same feel.
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...What is Controller,Info,Dataprovider and sqldata provider in DNNWhat is Controller,Info,Dataprovider and sqldata provider in DNN


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