Presentation is loading. Please wait.

Presentation is loading. Please wait.

DotNetNuke Portal Private Assembly Development Stan Schultes Stan Schultes Enterprise architect / application developer Enterprise architect / application.

Similar presentations


Presentation on theme: "DotNetNuke Portal Private Assembly Development Stan Schultes Stan Schultes Enterprise architect / application developer Enterprise architect / application."— Presentation transcript:

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

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

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

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

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

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

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

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

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

10 DotNetNuke Architecture

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

28 Questions?

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


Download ppt "DotNetNuke Portal Private Assembly Development Stan Schultes Stan Schultes Enterprise architect / application developer Enterprise architect / application."

Similar presentations


Ads by Google