.NET Answers

ASP.NET, HTML, CSS, Visual Studio, CSharp, VB.NET and other programming items of interest.
Subscribe
  • Home
  • About Me
  • Advertising
  • Click Here to Ask a question
    • Privacy Policy
  • Site Map

DotNetNuke Modules – Foundational Concepts

May 26, 2008 By: Dave

There are two design patterns that DotNetNuke relies on heavily, not just in the core code, but in any module you might develop.

The first is a three tiered architecture, or more appropriately a three layer architecture.  The second is the use of the Provider model.  If you don’t understand these two patterns, your first attempt at creating a module may end in frustration and possibly even disaster.  I don’t want to say that no one could write a module if they don’t understand these concepts, but I will go so far as to say that I would suspect any code that was written without understanding these two concepts.

We covered the basics of the three layer architecture several weeks ago while we were exploring database access.  The three layer architecture separates out the presentation layer (typically referred to as the view), the business logic layer (BLL), and the data access layer (DAL) into three distinct components.  This allows us the flexibility of changing either the presentation layer, the BLL or the DAL with minimal changes to the other layers.  Done correctly one could use the same BLL and DAL layer with both a Web application and a Windows Forms application.  In fact, I was able to place a Web Service interface over my BLL which a Windows Forms application is accessing to update a DotNetNuke module I created.

The second concept you’ll need to understand is the idea of Providers.  The best way of thinking of a provider is that they work like plug-ins.  But, unlike plug-ins that all obey the same interface, but provide different functionality, a Provider is providing interchangeable functionality.  The place you will see this when you are creating a DotNetNuke module is at the DAL level.  The default provider is the SqlProvider.  When you create your module, you’ll create a base provider class that defines the interface, and you will create a child class that defines the implementation for the MS-SQL database.  This model was initially created so that DotNetNuke could be run with either an Access database or an MS-SQL database.  The Access database support has been dropped but the provider model remains.  And, you can still find providers for the core DotNetNuke code from third party suppliers that support Oracle and MySQL.

In the DotNetNuke world, the classes that function as the conduit between the presentation layer and the data access layer are called Controllers.  This is another point of confusion if you are familiar with the three tiered architecture because one would normally think the class would be called “BusinessLogic” or something similar.  Frankly, I don’t have a good clear reason and I’d appreciate someone from the DNN team explaining it in the comments.  For now, just realize that when we refer to the controller class, we are referring to the business logic layer.

 

Other post in DotNetNuke - Module Development
  • Creating DotNetNuke Modules - May 20th, 2008
  • Creating DNN Modules - The Tools - May 22nd, 2008
  • DotNetNuke Modules - Foundational Concepts - May 26th, 2008
  • DotNetNuke Modules - Install DNN into VS 2008 - May 27th, 2008
  • DotNetNuke Modules - Creating Base Modules - May 28th, 2008
  • DotNetNuke Modules - Registering Your Module - May 29th, 2008
  • DotNetNuke Modules - Where Stuff Shows Up - June 3rd, 2008
  • DotNetNuke Modules - Benefits of Architecture - June 4th, 2008
  • DotNetNuke Modules - Anatomy of the View - June 9th, 2008
  • DotNetNuke Modules - Adding Actions - June 11th, 2008
  • DotNetNuke Modules - DNN Controls - Label - June 18th, 2008
  • DotNetNuke - Internationalization - June 25th, 2008
  • DotNetNuke Modules - Internationalization (part 2) - June 30th, 2008
  • DotNetNuke Modules - Labels w/ no Help - July 9th, 2008
  • DotNetNuke Modules - LinkButtons - July 14th, 2008
  • DotNetNuke Modules - Collapsible Panels - July 16th, 2008
  • DotNetNuke - The Data Layer - Installing CodeSmith - July 22nd, 2008
  • DotNetNuke - Modules - Creating The Tables - July 24th, 2008
  • DotNetNuke - Modules - Creating Stored Procs - July 29th, 2008
  • DotNetNuke - Modules - Portal Specific Modules - July 31st, 2008
  • DotNetNuke Modules - Data Access Layer - August 5th, 2008
  • DotNetNuke Modules - Data Access Layer - August 7th, 2008
  • DotNetNuke - Data Access Layer Alternative - August 12th, 2008
  • DotNetNuke - Modules - Linking within the module - August 14th, 2008
  • DotNetNuke - Make Your Module Searchable - August 19th, 2008
  • DotNetNuke Modules - Making Content Portable - August 25th, 2008
  • DotNetNuke Modules - Exceptions the DNN Way - September 2nd, 2008
  • DotNetNuke Modules - PortalModuleBase - September 4th, 2008
  • DotNetNuke Modules - Inter Module Communication - September 9th, 2008
  • DotNetNuke Modules - Finding The Page a Module is On - September 15th, 2008
  • DotNetNuke Modules - Caching - September 17th, 2008
  • DotNetNuke Modules - Module Settings - September 22nd, 2008
  • DotNetNuke Modules - Retrieving Settings - September 24th, 2008
  • DotNetNuke Modules - Advanced Architecture - October 20th, 2008
  • DotNetNuke Modules - Creating the PA - October 30th, 2008
  • DotNetNuke Modules - Automating the PA - November 5th, 2008
  • DotNetNuke - FileUploadControl Danger! - February 26th, 2009

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Related Post

  • DotNetNuke Modules – Creating the PA
  • DotNetNuke Modules – Retrieving Settings
  • DotNetNuke Modules – Module Settings
Bookmark to:

Add to Del.icio.us Add to digg Add to DotNetKicks Add to DZone Add to Facebook Add to Slashdot Add to Stumble Upon Add to Technorati
Hide Sites
Tags: dotnetnuke, modules

9 Responses to “ DotNetNuke Modules – Foundational Concepts ”

  1. # 1 RipR Says:
    May 26th, 2008 at 10:30 am

    What you described is the official DotNetNuke way of doing data access but the framework does not require you to do it this way.
    Currently I am using nhibernate in my module development.
    The only requirement for building a module is, in your user control (ascx) that you inherit from PortalModuleBase. The data access and business logic layer (if you chose to have one) are up to you.

  2. # 2 Dave Says:
    May 26th, 2008 at 10:43 am

    Yes, you are correct. But, you get ahead of the lesson. This is a SERIES. And, to introduce the variations prior to teaching the foundational concepts is to confuse the student.

    So, for those of you that are new to this, stay with me and ignore the comment from RipR for now.

  3. # 3 DotNetNuke Modules - Install DNN into VS 2008 Says:
    May 27th, 2008 at 7:36 am

    [...] .NET AnswersASP.NET, HTML, CSS, Visual Studio, CSharp, VB.NET and other programming items of interest. DotNetNuke Modules – Foundational Concepts [...]

  4. # 4 Creating DNN Modules - The Tools Says:
    May 28th, 2008 at 8:18 am

    [...] Foundational Concepts [...]

  5. # 5 DotNetNuke Modules - Creating Base Modules Says:
    June 6th, 2008 at 6:32 am

    [...] Foundational Concepts [...]

  6. # 6 Creating DotNetNuke Modules Says:
    June 18th, 2008 at 6:55 am

    [...] Foundational Concepts [...]

  7. # 7 DotNetNuke Modules - Where Stuff Shows Up Says:
    June 23rd, 2008 at 6:37 am

    [...] Foundational Concepts [...]

  8. # 8 DotNetNuke Modules - DNN Controls - Label Says:
    July 3rd, 2008 at 6:20 am

    [...] Foundational Concepts [...]

  9. # 9 DotNetNuke Modules - Benefits of Architecture Says:
    July 3rd, 2008 at 6:27 am

    [...] Foundational Concepts [...]

← Modify a DNN Module without touching the ASCX
DotNetNuke Modules – Install DNN into VS 2008 →
  • Search

  • Subscribe

    U COMMENT
    I FOLLOW

    Subscribe in a reader

    OR

    Subscribe via e-mail

    Enter your email address: 

    Delivered by FeedBurner

     

  • Follow Me

    • Twitter
    • FaceBook
    • Digg
    • StumbleUpon
    • Propeller
    • Delicious
    • Plaxo

     

  • Recent Posts

    • ASUS Eee PC 1005HA-PU1X-BK Black Netbook
    • jQuery – Date Picker
    • Using VB.NET From CSharp
    • iTextSharp – Adding Images
    • Hungarian Notation – Use What Works, Spit Out The Bones
    • Pre Order Windows 7
    • jQuery Dialog – With Validation Controls
    • iTextSharp – The easy way
    • Structure of my ASP.NET Web Applications
    • 35% Off Accronis True Image 2009 Home
    • VB.NET Hide Module Name
    • ASP.NET/VB.NET – Video Training
    • Does jQuery Make Us Lazy?
    • PDFs Using iTextSharp
    • Programming SEO – Ping



  • Advertise on this site through Lake Quincy Media
  • DotNetNuke Sponsor

     

    Most Valuable Blogger
  • Sponsor

  • Categories

    • Advanced CSharp
    • Advanced VB.NET
    • ASP.NET MVC
    • Did you know
    • DotNetNuke – Module Development
    • DotNetNuke – Skinning
    • internationalization
    • iTextSharp
    • jQuery
    • none
    • Seach Engine Optimization
    • Silverlight
    • SQL For Programmers
    • Twitter
    • winforms
  • Cloud

    .net ajax architecture asp.net book books containers csharp css dal dataset datasets dotnetnuke events gridview images internationalization internet explorer javascript jQuery json linq listview modules ms-sql MVC objectdatasource programming reflection seo Silverlight skinning sql testing tsql tutorial Twitter twitterizer vb.net video view Vista visual studio webservice WordPress
  • Archives

    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
    • Privacy Policy
  • Calendar

    May 2008
    S M T W T F S
    « Apr   Jun »
     123
    45678910
    11121314151617
    18192021222324
    25262728293031
  • Blogroll

    • Alvin Ashcraft’s Morning Dew
    • ASP.NET Consulting
    • Life Hacker
    • Remember Anything
    • The Price of Their Toys
    • Uncategorized Thought


.NET Answers © 2007 - 2008 All Rights Reserved.
Entries and Comments.