DevTeach2004 : Extending DotNetNuke with Custom Content Modules
Extending DotNetNuke with Custom Content Modules.
Jim Duffy.
NET217
These session notes serve primarily to share the content of the session and as a reference for me. They may also provide some value to those interested in the session topics. Some of the information found in these notes may be inaccurate due to my typing errors or a lack of understanding of the subject matter. DevTeach policy is that session material is available online to registered attendees only, so I cannot respond to any requests for session PPTs or source.
Had projector problems on getting started. Didn't phase Jim a bit.
Modules are containers that plug into tabs. Compiled .NET Private Assemblies.
Free DNN 2.0 Modules
- Users Online
- Private Messaging http://www.smcculloch.net
- Multipage Control http://www.bonosoft.com
Go to File Manager, Add File, select Custom Module, then the ZIPPED custom module.
Rule #1, don't mess with core code.
Module container features
- security mechanisms
- look and feel (container skins, minimize/maximize)
- caching
Module Controls
- Modules have at least two controls: view/edit
- View controls are used to display data and allow data to be selected
- Edit controls allow updates to the data with data entry forms
PortalModuleControl Class as the base class for modules. Properites: isEditaable, UserID, HelpFile, TabID, etc...
Portal Module Identification Information
Module Title, Module Key, Stored in ModuleControls table, Used when calling specific controls
All based on a key structure.
Presentation Layer: .ASCX files.
Business Logic Layer contains ModuleNameInfo and ModuleNameController classes.
Data Access Layer - Abstraction Layer with the overrideable functions. The abstraction layer talks to the data-specific layer for SQL, Access, etc...
Abstract layer in DataProvider.vb.
A second project is created for Data Access containing the SqlDataProvider class.
Steps
- create SQL objects
- create primary project
- create dataprovider project
- code bll, dal, and dataprovider
DontNetNuke CodeSmith templates.
DNN Jungle has project templates
Http://dnnjungle.vmasanas.net as well as CodeSmith Templates
DNN Project Templates in VS.NET. Sweet!
Table: ItemID, ModuleID, Message...
Store Provider projects in the providers folder of the project you're working with.
Be specific with namespaces and other naming to avoid conflicts with other modules.
Each ASCX control in module has key "Edit", "View", etc.. to determine which module to display.
Edit Module Definitions has control keyword, title, and source ASCX location.
Summary: I wanna be a DotNetNuke man. 9 out of 10.