1 / 29

DotNetNuke Portal Private Assembly Development

DotNetNuke Portal Private Assembly Development. Stan Schultes Enterprise architect / application developer Conference speaker, mentor, trainer Contributing Editor, Visual Studio Magazine Founder - .NET Pub Club (netpubclub.net) Microsoft MVP www.vbnetexpert.com stan@vbnetexpert.com.

genera
Download Presentation

DotNetNuke Portal Private Assembly Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DotNetNuke PortalPrivate Assembly Development • Stan Schultes • Enterprise architect / application developer • Conference speaker, mentor, trainer • Contributing Editor, Visual Studio Magazine • Founder - .NET Pub Club (netpubclub.net) • Microsoft MVP • www.vbnetexpert.com • stan@vbnetexpert.com

  2. Presentation Outline • Portal Review and Requirements • Private Assembly Installation • Technical Overview & Architecture • Data Provider Architecture • DNN in Design Mode • Private Assembly Development Process • Development Topics • Links and Resources

  3. DNN – Portal Review • DotNetNuke = Open Source portal • Tabs = portal organizational units • Modules = information containers • Info access controlled by Roles and Users • Data providers = implement storage in a variety of databases

  4. DNN - Portal Requirements • Current portal version: v2.1.2 • Requires: • Win2K, WinXP, or Win2K3 • IIS installed and operational • .NET Framework V1.1 • Access or SQL Server 2000 / MSDE • SMTP configured if you want to use mail • VS.NET 2003, or custom build environment (no SDK version available today) • DNN is written in VB.NET, but you can write modules (.DLLs) in any .NET language

  5. DNN - Installation Process • Installation Process: • Unzip the code to a directory, give ASPNET/Network Service account permissions to that directory • Create a virtual directory in IIS Manager • [ Create an empty SQL database, set up DB account ] • Edit web.config – set data providers up • Browse to http://localhost/vdir • Change Host and Admin passwords! • Upgrade Process: • Back up your current configuration • Unzip the new code into the directory structure • Browse to the vdir

  6. Demo – PA Installation • PA = Private Assembly (aka Custom Module) • Four PAs are distributed as samples: • PageTitle • Survey • Users Online • Whois • Installation with Host  File Manager • Config with Host  Module Definitions • Control Types, Multiple Controls

  7. DNN - Technical Overview • Framework application • Modular, extensible construction • Dynamically loaded user controls • Provider model • Business logic / UI layers separated • Online portal configuration by role • Multi-portal: parent or child configuration

  8. Provider Model • Data access based on the Whidbey Provider model (see Resources) • Databases supported: • Access (default), SQL Server 2000/MSDE • (future) mySQL, Oracle • Provider model: • Rich Text editing • Exceptions / Logging • Scheduling • Authentication (future)

  9. DotNetNuke Portal • Portal provides plumbing and services: • Membership • Role-based security • Personalization • Management • Navigation • Data access • Site & exception logging

  10. DotNetNuke Architecture

  11. Data Provider Architecture • Data Store – MS Data Access Application Block • Concrete Data Providers – built as separate .DLLs (SqlDataProvider.dll, AccessDP, etc.) • Abstract Data Provider – DataProvider.vb • Business Logic Layer – SuggestionsDB.vb: • Abstracts the data layer from the portal • Custom Business Object (CBO) helper • User Interface Layer – user controls (.ascx)

  12. Concrete Data Providers • Implemented as separate components • Use MS Data Access Application Block • SqlDataProvider.vb:

  13. Abstract Data Provider • Located in the Data Access Layer • Instance method is the Data Factory • DataProvider.vb:

  14. Business Components • Located in the Business Logic Layer • Interface structures between DB & app

  15. Business Components (cont’d) • Controller classes provide the app/DB conversion interface

  16. Data Layer Topics • Instance method – data factory • Configuration • Database scripts • {databaseOwner} and {objectQualifier} • Data transport via DataReaders • Custom Business Object Helper (CBO) • Null Handling • Caching

  17. DNN in Design Mode • DNN v2 built with VS.NET 2003 • Change .sln and .webinfo file if not default DotNetNuke vdir • Release mode vs. Debug mode • All standard modules are integrated in .sln • Build private modules in any language – as separate project.

  18. Project Organization • Directory structure: • Root – few .aspx’s, http handler, global.asax • Admin – user controls for all system pages • Components – business logic for portal • Controls – title, header, footer, skin controls • DesktopModules – module add-ins • Portals\n\ – content directories by portal • Providers – separate projects

  19. PA Development • PA = Private Assembly / Custom Module • Develop PAs in any .NET language • Development Overview: • Project Setup • Build the Data Layer • Create the User Controls • Package the PA for Installation • Deployment

  20. PA Dev – Project Setup • Tip: find a similar module and copy it • Create a new directory under DesktopModules: • VBNetExpert.Suggestions • Create new project in that directory: • Clear Root Namespace • Set build output path to DNN \bin directory • Set References • Create \Providers\DataProviders subdirs: • \SqlDataProvider • \AccessDataProvider • These will also become separate projects

  21. PA Dev – Build the Data Layer • Design your module’s logic • Build one data provider at a time • Create the required database table(s) • Create and test all Stored Procedures • Create abstract data layer (DataProvider.vb) • Create & build project for concrete data provider (SqlDataProvider.vb) • Create business objects (SuggestionsDB.vb)

  22. PA Dev – Create User Controls • This is the portal Presentation Layer • DNN V2 allows multiple user controls per module (V1 allowed two: Edit & Display) • In control sources: Imports DotNetNuke • All controls inherit from PortalModuleControl: • Main control (Suggestions) • Edit control (EditSuggestions) • Module options (EditSuggestionsOptions) • Other as required (DisplaySuggestions)

  23. PA Dev – Packaging for Install • Create DB install & uninstall scripts • Create .dnn file (installation manifest) • Folder contents & module strings • Modules & Controls • Files deployed (ascx, dll, sql, etc.) • Package additional files in .zip (images & icons, help & readme files, etc.) • Package everything into master .zip for upload to portal • Test!

  24. PA Dev – Deployment • PA deployed & managed through the Host account • All related Modules are included as “definitions” in Host  Module Definitions • Portal database tables affected: • DesktopModules • ModuleDefinitions • ModuleControls • Sql files need to be in UTF-8 format…

  25. Converting Modules from V1 • Convert data calls to Provider model • No longer share edit & module options with panel controls • Don’t include DesktopModuleTitle control • Module registration changes: • Module tables have changed • No .sql script for controls registration • .dnn file structure defines module registrations • PMC.Actions.Add for referencing controls • ArrayLists for data binding • Use EditURL and NavigateURL methods

  26. Development Topics • Roles & Permissions – how to detect them in the code • PortalModuleControl • ModuleID, TabID • Components\configuration.vb • ObjectBrowser is your friend!

  27. Development Topics (cont’d) • Development tools: • CodeSmith with templates • Skinning • Security • Modifying the core code

  28. Questions?

  29. Resources • DotNetNuke: www.dotnetnuke.com • FW 1.1: http://www.asp.net/download-1.1.aspx • Provider Model: http://msdn.microsoft.com/library/en-us/dnaspnet/html/asp02182004.asp • My V1 modules column: http://www.fawcette.com/vsm/2003_12/magazine/columns/gettingstarted/ • DNN docs: site documentation subfolder • DNN help: http://www.dotnetnukehelp.com • Resource portals: http://www.dnn.com.au, http://dnnjungle.vmasanas.net/ • Developer portal: http://www.dotnetnuke.dk • Free modules list: http://www.cathal.co.uk/Default.aspx?tabid=28

More Related