Presentation is loading. Please wait.

Presentation is loading. Please wait.

DotNetNuke Portal – Custom Module Development

Similar presentations


Presentation on theme: "DotNetNuke Portal – Custom Module Development"— Presentation transcript:

1 DotNetNuke Portal – Custom Module Development
Stan Schultes Enterprise architect / application developer Conference speaker, mentor, trainer Contributing Editor, Visual Studio Magazine Founder - .NET Pub Club (netpubclub.net) Microsoft MVP

2 WebCast Series on DotNetNuke
DNN v3 – Overview January 31, 2005 DNN v3 – Installation and Configuration DNN v3 – Portal Management February 4, 2005 DNN v3 – Custom Module Development Overview – General survey of DNN v3 portal features with highlights of things that are new in v3. Installation & Configuration – covers what you need to get the DNN v3 portal running. Portal Management – covers how to make the DNN v3 portal work for you. Custom Module Development – dives into what you need to know to develop custom modules, with examples.

3 Audience Polls How much experience with ASP.NET (0,<1yr, 1-2yr, 2-3yr, >3yr)? Who is using DNN in production today (Y/N)? Who has seen DNN v3 (Y/N)? Who is building Custom Modules (none, v1, v2, v3)?

4 Presentation Outline Portal Review and Requirements
Custom Module Installation Technical Overview & Architecture DNN in Design Mode, Breaking Changes Custom Module Development & Process Converting Modules from v1 & v2 Tips & Tricks and Resources This is a survey session!

5 DNN Portal Review & Reqm’ts
DNN is a “live CMS” Portals = web sites (unique URLs) Pages = portal organizational units Modules = information containers User access to info is controlled by Roles DNN v3 development requires: Win2K, WinXP, Server 2003 .NET FW v1.1, VS 2003 (can build without VS) SQL Server 2000, IIS, SMTP Tabs appear as the menu structure of the portal. Modules are sited on tabs and contain portal content. Module options provide specific customizations

6 Custom Module Installation
Custom Module aka Private Assembly (PA) PA is a zipfile containing files and .dnn manifest CMs distributed as samples: PageTitle Survey Users Online Install/Config with Host  Module Definitions Control Types, Multiple Controls Private Assembly – module for DNN which is built & packaged as a separate add-in component Install Suggestions Multiple modules appear within Host->Module Definitions under the definitions dropdown

7 DNN - Technical Overview
Modular, extensible, framework application Dynamically loaded user controls Online configuration & content mgmt by role Portals are web sites (unique URLs) Create sub-portals in the same installation Portals are individually managed and skinnnable Provider model allows pluggable services Modularizes the core Framework app –a dynamically generated application with a provider structure for plumbing (data access, membership, scheduler, logging, exceptions, etc.) Modular construction – modules plug in easily through an install/uninstall interface. You can deploy your portals with whatever modular options you want. Portals: Parent Portals are sites which have a unique URL ( ie. ) associated to them. Child Portals are subhosts of your Hosting Provider account. Essentially this means a directory is created on the web server which allows the site to be accessed through a URL address which includes a Parent domain name as well as the directory name ( ie. ). Provider model: data access, membership, html editor, search, scheduling, logging, friendly urls

8 DotNetNuke Data Architecture

9 Provider Model Based on Whidbey Provider model (see Resources)
Data provider: SQL Server 2000/MSDE Access – by Blackjacket Software (future) mySQL, Oracle Other Providers in v3: Membership (Whidbey membership model) HTML editor Logger Scheduler Search Friendly URLs Provider Model: an architected interface that allows optional or replacement features to be plugged in. Aka Factory Design Pattern. Create a generic interface or API as a contract, plug-ins conform to that contract (like COM)

10 DNN in Design Mode DNN v3 built with VS.NET 2003 (.NET Framework v1.1)
If not using default DotNetNuke virtual directory Change .sln and .webinfo files Web.config changes: Database connection string: SiteSqlServer in appSettings <compilation debug=true> <forms name=PortalName …> Data: objectQualifier, databaseOwner Release vs. Debug mode All standard modules are now separate projects Build custom modules in any .NET language Modify .sln and .vbproj.webinfo files if not using the default DotNetNuke virtual directory.

11 Breaking Changes in v3 Core
These are discussed in the Core Framework forum on ASP.NET: Username vs. ID FreeTextBox v2 and HTML Provider Reorganized Namespaces Removal of legacy files Use GetDBConnectionString instead of appSettings connection string NavigateURL and EditURL now use overloads Links to files Context.User.Identity.Name  UserInfo.UserID.ToString (commonly stored in CreatedByUser field) FTB – if you called FTB 1 code directly, your code won’t work. Namespaces: use PortalModuleBase instead of PortalModuleControl Legacy files: ModuleTitle.ascx, DesktopPortalBanner.ascx, DesktopPortalFooter.ascx, EditModule.aspx, or DesktopDefault.aspx Links to files – return FileID – must join to Files table to get actual path

12 Custom Module Development
Provider Model – plumbing & services Module Interfaces: IActionable – settings menu handling IPortable – for module import/export ISearchable – new search interface IUpgradeable – lets developer run custom logic DNN.Services.Personalization DNN.Services.Localization (static)

13 Custom Module Development 2
DNN.Services.FileSystem DNN.Services.Log & Exceptions DNN.Services.Scheduling DNN.UI.UserControls - Core User Controls: Address, DualListControl, Help, LabelControl, SectionHeadControl, TextEditor, UrlControl, UrlTrackingControl File sub-Folders & Permissions

14 CM Development Process
Development Overview: Project Setup Build the Data Layer Create the User Controls Package for Installation Deployment User Controls inherit from PortalModuleBase Typical controls: View, Edit, Settings Develop CMs in any .NET language

15 Custom Module Project Setup
Open the main DotNetNuke.sln Add your module and provider projects Reference DotNetNuke and MS DAAB Add references to BuildSupport project Solution Explorer: Configuration Manager, uncheck build boxes Set Default.aspx to default web page Fix all namespace and build issues

16 Converting Modules from v1
To start: convert to v2 modules, then to v3 Convert v1 data calls to v2 data provider model Edit & Module Options no longer shared with panel controls Module registration: Module tables have changed No .sql script for controls registration Manifest .dnn file structure defines module registrations PMC.Actions.Add for referencing controls ArrayLists for data binding Use EditURL and NavigateURL methods Be sure to test all SPs! Split original source Edit control with panels into two: Edit & Options Modules tables: DesktopModules, ModuleDefinitions, ModuleControls Legacy files: ModuleTitle.ascx, DesktopPortalBanner.ascx, DesktopPortalFooter.ascx, EditModule.aspx, and DesktopDefault.aspx ArrayLists instead of Data Readers for databinding - use al.count=0

17 Converting Modules from v2
Breaking changes list Legacy files removed – redirects must change Some replaced by skins / containers Refer to glbDefaultPage instead of Default.aspx Refer to routine HasNecessaryPermission in components\security\security.vb for permissions checks Database changes: addition of TabModules table Create proper namespaces and module prefixes Menu changes: implement IActionable (plus new interfaces) Module options: change Edit control key to Settings ModuleSettings vs. TabModuleSettings TabModules table – Modules no longer contains TabID Legacy files: ModuleTitle.ascx, DesktopPortalBanner.ascx, DesktopPortalFooter.ascx, EditModule.aspx, or DesktopDefault.aspx

18 Development – Tips & Tricks
Be familiar with standard modules source Find similar module to use as a starting point Use code generation tools: VS project templates, CodeSmith, PACT, etc. ObjectBrowser is your friend Purge vswebcache Goal: only modify core for critical bug fixes Switch providers to change core functions Docs: Module Dev Guide, Localization, Data Access, Membership, Client API, Skinning

19 Learn More DotNetNuke: www.dotnetnuke.com
FW 1.1: Provider Model: My V1 modules column: magazine/columns/gettingstarted/ DNN docs: site documentation subfolder DNN help: Resource sites: Developer sites: Free modules list:


Download ppt "DotNetNuke Portal – Custom Module Development"

Similar presentations


Ads by Google