10/16/07

Architectural Overview


The DotNetNuke architecture permits the application tiers to be distributed across two servers: the web server and the database server. The web server contains the Presentation, Business Logic, and Data Access Layers. The database server contains the Data Layer.


Presentation Layer

The Presentation Layer provides an interface for clients to access the portal application. This layer consists of the following elements:

  • Web forms: The primary web form is Default.aspx. This page is the entry point to the application. It is responsible for dynamically loading the other elements of the Presentation Layer. Default.aspx is in the root installation directory.

  • Skins: The Default.aspx web form loads the skin for the page based on the settings for each page or portal. The base Skin class is in /admin/Skins/Skin.vb.

  • Containers: The Default.aspx web form also loads the containers for the modules based on the settings for each module, page, and portal. The base Container class is in /admin/Containers/Container.vb.

  • Module user controls: Modules will have at least a single user control that is the user interface for the module. These user controls are loaded by Default.aspx and embedded within the containers and skin. The module user controls are in .ascx files in /DesktopModules/[module name].

  • Client-side scripts: There are several client-side JavaScript files that are used by the core userinterface framework. For example, the /DotNetNuke/controls/SolpartMenu/spmenu.js script file is used by the SolPartMenu control. Custom modules can include and reference JavaScript files as well. Client-side JavaScript files that are used by the core are in the /js folder. Some skins may use client-side JavaScript, in which case the scripts are in the skin's installation directory. Any client-side scripts used by modules are located under the module's installation directory.


When visiting a DotNetNuke portal, the web form that loads the portal page is Default.aspx. The code-behind for this page ($AppRoot/Default.aspx.vb) loads the selected skin for the active page. The skin is a user control that must inherit from the DotNetNuke.UI.Skins.Skin base class. The Skin class is where most of the action happens for the Presentation Layer.

First, the Skin class iterates through all of the modules that are associated with the portal page. Each module has a container assigned to it. The container is a visual boundary that separates one module from another. The container can be assigned to affect all modules within the entire portal, all modules within a specific page, or a single module. The Skin class loads the module's container and injects the module control into the container.

Next, the Skin class determines whether the module implements the DotNetNuke.Entities.Modules .iActionable interface. If it does, the Skin class discovers the actions that the module has defined and adds them to the container accordingly.

Then, the Skin class adds references to the module's style sheets to the rendered page. It looks for a file named module.css in the specific module's installation directory. If it exists, the class adds an Html GenericControl to the page to reference the style sheet for the module.

All of this happens within the Skin class in the Init event . The final rendering of the contents of a module is handled within each module's event lifecycle.

Finally, the code-behind ($AppRoot/Default.aspx.vb) renders the appropriate style-sheet links based on the configuration of the portal and its skin.

Business Logic Layer

The Business Logic Layer provides the business logic for all core portal activity. This layer exposes many services to core and third-party modules. These services include:

  • Localization

  • Caching

  • Exception management

  • Event logging

  • Personalization

  • Search

  • Installation and upgrades

  • Membership, roles, and profile

  • Security permissions

The Business Logic Layer is also home to Custom Business Objects (CBOs), whose fundamental purpose is to store information about an object.

The Data Access Layer provides data services to the Business Logic Layer. It allows for data to flow to and from a data store.

As described earlier in this chapter, the Data Access Layer uses the Provider Model to enable DotNetNuke to support a wide array of data stores. The Data Access Layer consists of two elements:

  • Data Provider API: An abstract base class that establishes the contract that the implementation of the API must fulfill.

  • Implementation of Data Provider API: A class that inherits from the Data Provider API class and fulfills the contract by overriding the necessary members and methods.

The core DotNetNuke release provides a Microsoft SQL Server implementation of the Data Provider API.

Beginning with the CBO Controller class, the following code snippets show how the Data Provider API works with the Implementation of the Data Provider API. Listing 7-6 shows how the IDataReader that is sent into CBO.FillObject is a call to DataProvider.Instance().GetFolder(PortalID, FolderPath).

Listing 7-6: The FolderController.GetFolder Method
Image from book
Public Function GetFolder(ByVal PortalID As Integer, ByVal FolderPath As Image from book
String) As FolderInfo
Return CType(CBO.FillObject(DataProvider.Instance().GetFolder(PortalID, _
FolderPath), GetType(Services.FileSystem.FolderInfo)), FolderInfo)
End Function
Image from book

Figure 7-5 breaks down each of the elements in this method call.

Figure 7-5

The Instance() method returns an instance of the implementation of the Data Provider API, and therefore executes the method in the provider itself.

DotNetNuke uses the Data Access Application Block to improve performance and reduce the amount of custom code required for data access. The Data Access Application Block is a .NET component that works with ADO.NET to call stored procedures and execute SQL commands on Microsoft SQL Server.

Data Layer

The Data Layer provides data to the Data Access Layer. The data store used in the Data Layer must be supported by the implementation of the Data Provider API to fulfill the data requests.

Because the DotNetNuke Data Provider Model is so extensible, there are several Data Providers available, including core-released Data Providers and third-party providers such as Microsoft SQL Server, Firebird, MySQL, and Oracle providers. The core DotNetNuke release provides a Microsoft SQL Server implementation of the Data Provider API (which includes support for Microsoft SQL Server 2005 Express).

Installation Scripts

Included in the implementation of the API is a collection of scripts that create the database in the Data Layer during the installation process. These scripts collectively create the database tables, stored procedures, and data necessary to run DotNetNuke. The installation scripts are run only during a new installation and are run from the DotNetNuke.Services.Upgrade.Upgrade.InstallDNN method. The scripts are as follows:

  • DotNetNuke.SetUp.SqlDataProvider: Prepares the database for the installation by dropping some key tables.

  • DotNetNuke.Schema.SqlDataProvider: Installs the tables and stored procedures.

  • DotNetNuke.Data.SqlDataProvider: Fills the tables with data.


Upgrade Scripts

For subsequent upgrades performed after the initial installation, a collection of scripts that modify the schema or data during the upgrade process is run from the DotNetNuke.Services.Upgrade.Upgrade .UpgradeDNN method. There is one script per baseline version of DotNetNuke. A baseline version is a working version of DotNetNuke that represents some internal milestone. For example, after the core team integrates a major new feature, such as the Member Role Provider, the code is tested, compiled, and zipped for distribution among the Core Team. This doesn't necessarily mean there is one script per released version of DotNetNuke — behind the scenes, we may have several baseline versions before a formal public release.

The file-naming convention includes the version of the script followed by the SqlDataProvider extension. The extension must be the same name as found in the DefaultProvider attribute of the Data Provider's configuration settings in the web.config file. For example, the filename for the upgrade script for upgrading from baseline version 4.0.2 to 4.0.3 is 04.00.03.SqlDataProvider.

When the DotNetNuke application is upgraded to another version, these scripts are executed in logical order according to the version number. Only the scripts with a version number that is less than or equal to the value of the constant DotNetNuke.Common.Globals.glbAppVersion are run. This constant is defined in the /components/Shared/Globals.vb file.


Script Syntax

The scripts are written in SQL, but there are two important non-SQL tags used in them: {databaseOwner} and {objectQualifier}. Both of these tags represent a programmatically replaceable element of the script. Earlier in this chapter, Listing 7-1 showed the configuration settings for the Microsoft SQL Server Data Provider implementation that included two XML attributes named databaseOwner and object Qualifier. The databaseOwner attribute defines the database owner to append to data objects in the scripts. The objectQualifier attribute defines a string to prefix the data objects with in the scripts.

For example, Listing 7-9 shows how the GetSearchSettings stored procedure is created in the 03.00.04.SqlDataProvider script.

Listing 7-9: A SqlDataProvider Upgrade Script
Image from book
CREATE PROCEDURE {databaseOwner}{objectQualifier}GetSearchSettings
@ModuleID int
AS
SELECT tm.ModuleID,
settings.SettingName,
settings.SettingValue
FROM {objectQualifier}Tabs searchTabs INNER JOIN
{objectQualifier}TabModules searchTabModules
ON searchTabs.TabID = searchTabModules.TabID INNER JOIN
{objectQualifier}Portals p
ON searchTabs.PortalID = p.PortalID INNER JOIN
{objectQualifier}Tabs t
ON p.PortalID = t.PortalID INNER JOIN
{objectQualifier}TabModules tm
ON t.TabID = tm.TabID INNER JOIN
{objectQualifier}ModuleSettings settings
ON searchTabModules.ModuleID = settings.ModuleID
WHERE searchTabs.TabName = N'Search Admin'
AND tm.ModuleID = @ModuleID
GO
Image from book

This code looks like SQL with the addition of the two non-SQL tags. The first line creates a new stored procedure:

CREATE PROCEDURE {databaseOwner}{objectQualifier}GetSearchSettings

It is created in the context of the databaseOwner defined in web.config, and the name of the stored procedure is prefixed with the objectQualifier value from web.config.

If in web.config the databaseOwner is set to dbo and the objectQualifier is set to DNN, the preceding line would be programmatically converted to:

CREATE PROCEDURE dbo.DNN_GetSearchSettings

The objectQualifier attribute is useful when you want to maintain multiple instances of DotNetNuke in the same database. For example, you could have a single web server with 10 DotNetNuke installations on it, each using the same database. But you wouldn't want these 10 installations using the same data tables. The objectQualifier attribute adds the flexibility for you to store data from multiple DotNetNuke installations in the same database.

--
Happy day, happy life!

How to make money from your DotNetNuke website

ref: http://www.dnncreative.com/Articles/Business/Howtomakemoneyfromyourwebsite/tabid/297/Default.aspx

There are several ways in which you can monetize your DotNetNuke website. In this article we are going to discuss the methods that are available with the default modules in DotNetNuke.

These methods can be used with any type of website from a static to a dynamic website. The advantage of using DNN is the flexibility and ease of use for configuring and tracking.

Advertising

The first and easiest method for a web master to implement on their website is to enable advertising.

There are several advertising methods that you can implement and we will discuss each of them in turn.
DotNetNuke provides an easy solution for combining all of the various advertising methods through the use of the Banners module. The Banners module allows you to rotate advertisements on each page load, while also allowing you to track the number of click-throughs for each advertisement.

The banners module can display all of the advertising types that are mentioned below; it is not just limited to displaying banner image advertisements.

You can learn how to use and configure the banners module in this tutorial.

Payment Schemes

Before we discuss the various advertising methods, we need to explain the payment schemes that the advertising methods tend to use.

Pay-Per-Impression

Your payments are based on how many impressions you display an advertisers’ banner for. An impression is a page view of the banner by a visitor to your website. Typically payments are calculated on a Cost-Per-Thousand impressions (CPM) basis ie. $5 CPM refers to $5 for 1000 displays of the banner. The higher the traffic on your website the more impressions you can generate and therefore the more advertisers you can display and create more income.

On very high traffic websites some webmasters use a pay per month method where you pay a set amount to advertise on the website for the month with a guaranteed minimum number of impressions.
Pay-Per-Click
You receive a payment each time an advertisement is clicked on. Payments for this can vary from a few cents to several dollars per click. The payment level depends on the niche and the consumer demand for the niche. Other factors that you need to take into consideration are your conversion level ie. How many times is an advertisement displayed before it receives a click? If you can generate a high CTR (Click-Through-Rate) and a high level of traffic you can generate a good source of income even from low paying pay-per-click advertisements.
Pay-Per-Lead
Here you receive a payment for any leads you send to the advertiser. The visitor to the advertisers’ website may have to supply their email address and sign up to an email newsletter before you receive a payment.

You need to bear in mind that this may involve two steps. The first is the conversion of the visitor clicking on the advertisement on your website and the second is the conversion of the visitor on the advertisers’ website signing up to the newsletter.

This type of income may receive fewer conversions than pay per click, but the payments per lead tend to be higher, so you can potentially earn a higher income than Pay-Per-Click.
Pay-Per-Sale
Potentially this method has the lowest conversion rate, but if the advertisers are carefully targeted to the niche topic of your website you could receive a large income. An example of this is the affiliate marketers that earn millions each year from selling other peoples products. In this method you only receive a payment when a visitor to your website purchases a product from your advertiser.

Payments

If you are implementing Pay-Per-Impressions advertising you can request payment for the advertisement up front before you allow the advertisement to be displayed on your website. For all of the other methods, payment tends to be held back until you have accumulated on average $100 in clicks / leads / sales. Also make sure that you double check how soon they make a payment after you reach the minimum payment level. Some programmes may wait 30 days until they pay you. This is important to check for the cashflow of your business.

Tip

If there is one tip I can pass on it is this. Test the advertisement method for a month and if it is not making enough money, analyze why:
  • Do you need to increase the conversion rate?
  • Do you need to increase the traffic?
  • Is the advertisement suitable for your niche market?
Several years ago, I learnt a lesson the hard way. In the first year of creating a website directory, all of the advertising was based on the pay per sale method. The traffic on the website was high, the click through rate on the banner ads was good, but the sale conversion was very low (the products were not close enough to my niche). I made less than $100 in a year which I never received because the minimum payment was $100. I then switched to pay-per-click and pay-per-impression and made several hundred dollars in the first month! I realised I had literally lost thousands of dollars over that year from not testing and analyzing the advertising methods.

The DotNetNuke banners module allows you to rotate between ads that use the various payment methods, so you can easily setup and analyse the conversion rate of several advertising methods at once and avoid the mistakes I made.

As a starting point I would suggest that you try each of the payment methods and analyze which ones provide you with the most income for your website.

Note: I have had successes with Pay-Per-Sale; you just need to ensure that the advertisements are very close to your website market niche and that the visitors to your website are willing to buy products.

Advertisement Methods

You have several options available for advertising within your DotNetNuke portal. They can be split into two groups, image based advertisements and text based advertisements.
Image based advertisements
The banners module in DotNetNuke allows you to upload the following banner image types to your portal:
  • Banner
  • MicroButton
  • Button
  • Block
  • Skyscraper
banner types

Here is an example of the typical sizes for these banner ads:

Banner sizes
Text / Script based advertisements
Using the banners module you can display text ads or you can enter a script to display an advertisement from a programme such as Google Adsense, examples below:
The DotNetNuke Banners module advantage
The DotNetNuke banners module can display a combination of these different advertisement methods at the same time and rotate between the various advertisements.

For instance if you have an advertising space available on the right hand column of your pages, you could display within the same column, a text ad, a Google Adsense ad and another text ad. With the next refresh of the page this could switch to a skyscraper ad and two text ads. You can learn these advanced configuration techniques in this tutorial.

This has the advantage that the position of the advertisements and the type of advertisement is always changing, which should help to grab the attention of a visitor and avoid 'ad blindness.'

Email Newsletter advertisements
If you send a regular newsletter, you could include advertisements within the email. But, make sure that your recipients have opted-in to the email as they could become very annoyed if you send emails trying to sell them products. Here you can learn about the Email Newsletters module.

Programmes

We have covered the various payment methods and advertising methods, the next step is to find advertisers for your website and this is actually not as hard as it may sound.
DIY - Do It Yourself
Probably the first advertising method to appear on the internet and the hardest if you are just launching your website. This involves approaching companies that provide products or services that complement the niche of your website. In most cases you will need to provide a PDF document outlining the cost structure for advertising, the niche market, and the number of visitors / page views you receive on average each month for your website.

Make sure you include a ‘Terms of Use’ document in-case any problems occur with the advertiser and also create a page within your website informing visitors that you offer advertising. (You could combine this with a banner advertisement that states ‘Would you like to advertise here?’).

If your website is already established with a high amount of traffic, you may find that advertisers contact you to advertise on your website.

Payment method: Pay-Per-Impression and Pay-Per-Month are typical for this type of advertising.

Advertising method: All banner types, text advertisements and even email newsletter advertisements are suitable for the DIY approach. You can charge varying amounts for the banner types and position of the banner on the page.
Advertisements for content
This is one of the popular and easiest methods for creating an income from your website. It also requires no maintenance as everything is automated.

The most popular programme for this is Google Adsense. All you have to do is sign up to Google Adsense and add the short Javascript code to your DotNetNuke Banners module.

This will display advertisements directly related to the content of your page meaning you have very specific advertisements related to the niche topic of your website.

Payment method: Pay-Per-Click

Advertising method: Text ads are mainly used, but banner image ads can also be displayed. You have the option for configuring the layout of the text ads into various banner sizes.

I would recommend you view An Introduction to Google Adsense followed by this video tutorial, which walks you through how to incorporate Adsense with DotNetNuke. This is recommended over just using the Banners module for displaying Google Ads to increase your click-through-rate and profits.

Here is a selection of programmes that are worth experimenting with:

BidVertiser


Yahoo Network
Affiliate advertising
Here you operate as an affiliate to another company. In most cases you register with the company as an affiliate through their website. Some affiliate programmes require that you have a website and sometimes a minimum amount of traffic. The company will decide whether or not to approve or reject your application as an affiliate; generally this is based on the content of your website. Once approved, you will have access to the affiliates section of their website which will provide you with:

Your affiliate id – Place this id in the advertisement URL link. This id is used to track the click-throughs from your website.

Advertisements – Banner ads, Text ads, Email content etc. If it is a good affiliate programme they should supply you with a large selection of advertising content to choose from. You can place these advertisements in the DotNetNuke Banners module along with your affiliate link.

Tracking Reports and Stats – A good affiliate programme will allow you to view the number of click-throughs / conversions / sales / leads that you have made along with the amount of money you have earned.

Extras – Support, tips, help, forum, pricing structure benefits for users that generate a high number of sales etc. All of these help to provide a good affiliate programme.

Payment method: Usually Cost-Per-Sale and Cost-Per-Lead, some programmes will provide Cost-Per-Click.

Advertising method: All methods can be used, image, text and email advertisements. You can also incorporate links to affiliate programmes directly within the content of your website. For instance, if you are writing a book review, you could include an affiliate link to amazon.com for the visitor of your website to buy the book.
Affiliate Programmes
Here is a selection of affiliate programmes to get you started:

CPA Empire

MAXBounty

Azoogle Ads

Modern Click

Commission Junction

Amazon

Click Bank
Affiliate Tools
Pay Per Lead Power Ads - This is a really useful tool that allows you to search through the major affiliate providers from one website. Once you have selected the affiliate programmes suitable to your website niche you can then create text link ads which display in a similar way to Google Adsense. You can even set the tool to create links in your content which link to the affiliate programmes automatically.
Affiliate Information
The affiliate classroom is a useful resource if you are considering using affiliate promotions. Have a look at:
Affiliate Classroom

Affiliate Classroom tour video

Advertising Summary

The DotNetNuke Banners module is ideal for all of the various advertising options that are available. Make sure that you track the impressions, CTR, and earnings to ensure your advertising is profitable.

Further monetization methods

As well as advertising there are also the following methods of making money from your DotNetNuke portal.
Subscriptions
DotNetNuke allows you to easily setup subscription payments on your portal. This allows you to charge a fee for access to content such as articles, downloads, videos, music etc.

You can watch a video tutorial here demonstrating How to set up DotNetNuke to accept subscription payments

You can also purchase a module from Ventrian called Subscription Tools which is a user friendly method for implementing subscriptions on a DotNetNuke portal.

You need to bear in mind that the subscription method is not a passive form of income like the advertising method. It will involve many hours of customer support, creating content and maintaining your website.
Sell Products
The final monetization method that we are going to discuss in this article is the store. In the latest version of DotNetNuke (v4.3.6 at the time of writing) a store module is included in the core modules, however if you are looking for a more sophisticated store module, have a look on snowcovered for the various options available. Catalook is a popular store. Setting up a store is probably the most time-consuming option, but potentially the most profitable.

Customer support, world-wide deliveries, and credit card payments all need to be taken into account.

Conclusion

The default installation of DotNetNuke can be used to make money online without the need of purchasing additional premium modules. You can literally be up and running making money with just the cost of hosting, a domain name and your time to build the website.

The usual piece of advice is ‘do not put all of your eggs in one basket.’ In other words, do not rely on one advertisement type or programme, use a selection of income streams and if one fails in a particular month you will still be able to pay the bills.

Advertising is the easiest and least time consuming method for generating an income. In some cases, you can literally create a site and forget about it. Whereas subscription and stores require much more hands on time dealing with customers and maintenance of the website.

Please click here to add any questions, comments or further information you have found to be useful.

Custom Business Objects

Custom Business Objects
A Custom Business Object (CBO) is essentially a blueprint, or representation, of an object that is important to the application.

The FileInfo class has no methods, only properties. This is an important distinction to recognize — CBOs only have properties. The methods to manage the CBO are in a CBO Controller class specific to the CBO. A CBO Controller class contains the business logic necessary to work with its associated CBO class.

CBO Hydrator

One powerful core service is the CBO Hydrator, which is located in the CBO class in /components/ Shared/CBO.vb. It is a collection of methods that provide a centralized means of hydrating a CBO or a collection of CBOs.

Using the CBO Hydrator significantly reduces the amount of code needed to fill an object or collection of objects.
--
Happy day, happy life!

Provider Model

The Provider Model is a design pattern that is used in the DotNetNuke architecture to allow core functionality to be replaced without modifying core code. The introduction of the Provider Model started with Microsoft in its need to provide a simple, extensible API in .NET. The Provider Model was formalized in ASP.NET 2.0 as a best-practice design pattern. The purpose of the Provider Model is to provide a welldocumented, easy-to-understand API that has the benefits of simplicity and the power of extensibility.

To provide both simplicity and extensibility, the API is separated from the implementation of the API. A provider is a contract between an API and the business logic that establishes the functionality that the implementation of the API must provide. When a method in the API is called, it is the implementation of the API that fulfills the request. Simply put, the API doesn't care how the job is done, as long as it is done. If there is one useful concept garnered from this section, let it be this oversimplification of the purpose of the Provider Model:


Note 

Build things so they do not depend on the details of other things.

This fundamental design concept was recognized well before the Provider Model came to fruition, but it truly speaks to what the Provider Model brings to developers. The API in the Provider Model does not depend on the details of the implementation of the API. Therefore, the implementation of the API can be changed easily, and the API itself is unaffected due to the abstraction.


Provider Model Usage

There are several areas in DotNetNuke that use the Provider Model:

  • Data Provider

  • Scheduling Provider

  • Logging Provider

  • HTML Editor Provider

  • Search Provider

  • Friendly URL Provider


Provider Configuration

The Provider API has to be configured to work with the implementation of the API. The API needs to be configured to know which type and assembly to use for the implementation of the API. As mentioned in the previous section, this is handled in the web.config file.

The configuration settings are in XML in the web.config file. There is no standard for naming conventions or the structure of the configuration settings in the Provider Model in general. However, DotNetNuke has followed a consistent pattern in each Provider Model API and the associated configuration settings.

Each API may have different requirements for configuration settings. For example, the Data Provider API needs a connection string defined in its configuration settings. The XML Logging Provider needs its log configuration file location defined in its configuration settings. So each API has configuration settings that are specific to it.

The DotNetNuke core providers store the Provider Model API configuration settings in web.config under the /configuration/dotnetnuke node. When a Provider Model API is first instantiated, it collects these settings, which enable it to use the specified implementation of the API. The configuration settings are then cached so that in subsequent requests, the configuration settings are retrieved more quickly. Listing 7-1 shows a section of the web.config file that contains the Data Provider API's configuration settings.

Listing 7-1: Data Provider Configuration Settings
Image from book
 <data defaultProvider="SqlDataProvider">
<providers>
<clear />
<add name="SqlDataProvider"
type=" DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider"
connectionStringName="SiteSqlServer"
upgradeConnectionString=""
providerPath="~\Providers\DataProviders\SqlDataProvider\"
objectQualifier=""
templateFile="DotNetNuke_template.mdf"
databaseOwner="dbo" />
</providers>
</data>
Image from book

The Provider Model has brought great value to DotNetNuke in the way that it allows for functionality to be replaced without modifying the core code. In DotNetNuke, as in most open-source applications, the core code should not be modified by its consumers if at all possible. The Provider Model helps enforce this fundamental standard of open-source application development. It also provides a new level of abstraction between the Data Access Layer and the data store.


--
Happy day, happy life!

Technologies Used by DotNetNuke

DotNetNuke uses several key technologies in its supported architecture:

  • An operating system that supports ASP.NET (that is, Windows 2000 with SP4, Windows 2003 Server, Windows XP with SP2, and so on).

  • The ASP.NET framework (DotNetNuke 3.2 can be run on both ASP.NET 1.1 and 2.0, but the development project structure is specifically configured for ASP.NET 1.1. DotNetNuke 4 requires the ASP.NET 2.0 framework for both runtime and development.)

  • Visual Basic .NET (C# can be used to write extensions to the platform).

  • Web forms

  • Microsoft Internet Information Services (or any web server capable of supporting ASP.NET such as the built-in web server in VWD Express and so on)

  • ADO.NET

  • Microsoft SQL Server 2000 or Microsoft SQL Server 2005 (Express, Standard, or Enterprise)

In addition, DotNetNuke showcases several key design patterns and concepts that differentiate it from many other web applications' frameworks and provide a foundation that demonstrates and encourages best-practice programming:

  • Provider Model

  • Custom Business Objects and Controllers

  • Centralized Custom Business Object Hydration

  • Membership, Roles, and Profile Providers using ASP.NET 2.0 API

  • Localization framework that mirrors the ASP.NET 2.0 implementation



--
Happy day, happy life!

Namespace Overview

  • DotNetNuke.Common: Used for all classes used throughout the entire DotNetNuke application. For example, the global constants that are used throughout the application are found in the DotNetNuke.Common.Globals class.

  • DotNetNuke.Data: Used for any classes relating to the Data Access Layer. For example, the DataProvider base class for the Data Provider API is in the DotNetNuke.Data namespace.

  • DotNetNuke.Entities: Used for the classes that represent and manage the five entities that make a portal. They are Host, Portals, Tabs, Users, and Modules. The Modules namespace that falls under DotNetNuke.Entities is home to the functionality behind managing modules. The actual modules themselves have their own second-level namespace: DotNetNuke.Modules.

  • DotNetNuke.Framework: Home to several base classes and other utilities used by the DotNetNuke application.

  • DotNetNuke.Modules: Used for organizing portal modules. There is a child namespace in the core named DotNetNuke.Modules.Admin where the classes for all of the core admin modules reside. For example, the Host Settings module is found in the DotNetNuke.Modules.Admin.Host.HostSettingsModule class.

  • DotNetNuke.Security: Used for authorization and authentication classes. This includes tab permissions, module permissions, folder permissions, roles, and other portal security classes.

  • DotNetNuke.Services: Used for any services the core provides for modules. In this namespace, the child namespaces for exception management, localization, personalization, search, and several others reside.

  • DotNetNuke.UI: Used for any user interface classes. For example, the Skin and Container classes are found in DotNetNuke.UI.Skins.Skin and DotNetNuke.UI.Containers.Container, respectively.

Modules

A module is a pluggable user interface component that processes requests and generates dynamic content. This definition is similar to that of an ASP.NET page, with the exception that a module can appear only on an ASP.NET page, and a page may contain any number of module "instances."


DotNetNuke needs to perform a number of steps to process a page request. The following steps execute during the initialization of the page and work to dynamically load modules at runtime. The dynamically created modules are then capable of handling their own life cycle including events such as initialization, load, and render.

Step 1: Page Configuration Retrieval

The first step is to retrieve the modules for the requested page. The retrieval step comprises a number of important pieces of information, such as the modules that appear on the page, the section of the page on which they will appear (known as content panes), and, finally, the security roles associated with each module.

Step 2: Security Audit

The second step is to make some decisions about the security information retrieved in the previous step. By examining the current user roles (whether a registered user or anonymous) and the view roles associated with each module, you can form a list of "authorized" modules for the current page.

Step 3: Content Injection

The third (and final) step is to inject the "authorized" modules dynamically into the corresponding content panes of the page. After all of the modules have been loaded, each module is then able to execute its own series of events and render content.

Module

As mentioned previously, a portal is a web-based application that processes requests and generates dynamic content. Each module produces its own piece of markup (known as a fragment) and together with the skin's markup shows a complete document.

Because each module produces its own markup, it can be viewed as a tiny application within a larger application. Usually, users interact with the content produced by each module by clicking links or submitting forms that are then processed by the portal system and the command passed to the corresponding module.

Module Container

The decorations surrounding a module are known as a module container. Through this container, a user is able to interact with the module and perform actions such as minimizing, maximizing, and more advanced features (if the user has edit privileges on that module).

User Content Modules

Announcements Module
The Announcements module enables you to create short articles for your visitors and even to expire the older articles as the content becomes obsolete. This module provides an easy-to-use interface for keeping your content fresh and rotated. You can use the module to display news releases or a collection of related articles, or merely as a teaser to other content in your portal.

You'll now add an Announcements module to your base installation and see exactly how this module works. Start by opening your web browser to the application and logging in with the administrator account to add the module to your page. Then you will add some content to your module instance.

Note: You do not have to be the administrator to accomplish this task. You could set up a role with edit permission to your page and offload this task to another individual in your organization. This is made possible by the roles-based security the application employs to control access to content and administration.

Module Settings Options

Option

Description

Module Title

The module's title.

Permissions

Set which roles will have access to edit the content in your module. Several options are available for controlling the security of the module's content. A special option is the Inherit View Permissions from Page check box, which allows the security settings specified at the page level to secure your module.

Display Module On All Pages

Define a module that will appear on all pages within your portal. This can be useful when you're defining advertising or navigation-type modules that you need to display to your users regardless of the page they are visiting.

Header

Define content to display above your module's content.

Footer

Define content to display under your module's content.

Start Date

The date you want the content to start displaying to your users. This can be useful for planning content that you want to appear only after a certain date.

End Date

Specify when outdated content should expire.

Page Settings Options

Option

Description

Icon

Enhance the display of your module by adding an image to the left of the title. The file you use must reside in one of the areas defined in your File Manager area.

Alignment

Specify the alignment of your module in the pane.

Color

Specify the background color of the content that appears in this module.

Border

Specify a border width for your content in the module.

Visibility

DotNetNuke exposes methods to allow your users to expand and collapse content to save real estate. The Visibility options enable you to define the default behavior of the module and whether you want users to be able to hide or display the module's content.

Display Title

Display or hide the module's title.

Allow Print

Enables you to expose the print module action, which displays a print icon users can select to print the module's content in a print-friendly format.

Allow Syndicate

Enables you to expose your module's content in an XML format, which allows other web authors to consume and display your content on another web site.

Module Container

Set the container to use for the module's display in the portal.

Cache Time

DotNetNuke uses caching to increase the performance of the application. This setting enables you to set the number of seconds the module should remain cached in memory.

Set As Default Settings

Use this module's settings as the default for all the modules you add to your portal.

Apply To All Modules

This is a time-saver if you decide you want the default behavior of all modules to be different from your original settings. You can apply the settings to one module and push those settings to all instances of modules in the portal.

Move To Page

Enables you to move this module instance to another page in the portal.

Note


Edit Announcements Options
Option Description
Title The title that describes the individual announcement. By default, the date the announcement is created is appended to the title you define here. If you do not want this date to appear to your users, uncheck the Add Date check box.

Your browser may not support display of this image.

Description The content for your announcement. This module uses the FreeTextBox (FTB) control to make it easier for users to format the display of the text. If this particular announcement does not require rich text formatting functionality, you can use the text box option, which dynamically removes the instance of FTB and enables you to use only a text box for this function.
Link Specify a location where users can obtain more information about the announcement. Enabling this option creates a link at the end of your announcement that, when clicked by the user, allows navigation to the link you define. The default option is to not provide a link (None). If you select the URL option, the location control changes to a text box, allowing you to specify an external URL. If you select the Page or File option, the Location control changes to a drop-down list, which enables you to select the page or file where the additional information resides. Additional options allow you to further customize the link to capture the number of times an article is clicked, who clicked it, and a choice to open it in a new window.

Expires Set a date when the content should expire and no longer be viewable by your users.
View Order By default, announcements are displayed in ascending order according to their creation date. The View Order option enables you to define the order in which you want announcements to appear.

Banner Module

The Banner module provides a method of offering advertisements in the DotNetNuke application. Administering this module is a little different from any of the other base modules because this module works in conjunction with the Vendors module, which is an administrator-only module. Banners can be controlled from the Host level or Portal level, and the Host or SuperUser account controls this behavior.

Probably the first thing you will notice when you add this module to a page is that you see only a Banner Options action and not an Add New Action option, like the other modules display. This is because the banners will need to be added from either the Admin Vendors page or from the Host Vendors page. This is one of the functions that makes DotNetNuke a viable host platform, because you can offer free or inexpensive portals for your users and then recuperate your hosting costs by offering advertising on the individual portals in your DotNetNuke installation.

Edit Banner Options
Option Description
Banner Source Selecting one of these radio buttons enables you to specify whether the vendor banners shown in this module should originate from the host or from the portal.
Banner Type The type of banner that should be shown in this module. Banner types include Banner, MicroButton, Button, Block, Skyscraper, Text, and Script. Selecting a specific type means the vendor must have that type assigned to its account or the module won't show that vendor's advertisements.
Banner Group Enables you to associate a group of banners in the administrator vendor's module, such as the Site Banner group. Entering the banner group here enables you to group the same types of banners.
Banner Count Defines the number of times a banner will display to the users.
Orientation Enables you to display the banner either vertically or horizontally. The type of banner you chose usually dictates which option you should select.
Border Width Defines the width of the border.
Border Color Sets the border color.
Row Height Sets a row height for your banner.
Row Width Sets a row width for your banner.

Contacts Module

Almost every web site, regardless of content area, needs a method to provide information to contact the site's owners and employees. This is the purpose of the Contacts module. You can add your contact information and provide an easy-to-use interface for updating it to maintain current information. You can create an entire company directory from this module or display contact information for only a few individuals. The types of information you can display include the name, employee role, e-mail address, and telephone numbers for the individuals listed.

Discussions Module

The Discussions module is a lightweight forum module your users can use to share information. It isn't designed to be a full-fledged forum platform, but it will work for light forum activities you may need to offer on your web site. This module uses the same settings as the previous modules have used, so there's no need to cover those activities again.

Documents Module

The Documents module enables you to upload files to your portal and offer those files to your users for download. This is a fairly useful module because you will likely need to offer examples or additional information in the form of Word documents or other types of files to your users. The types of files you can use with this module are controlled by the file type settings under the Host Settings page. By default, DotNetNuke allows the following extensions:

.jpg .png .txt

.jpeg .doc .xml

.jpe .xls .xsl

.gif .ppt .css

.bmp .pdf .zip

If you require additional file types not allowed by default, you will need to add the extension under the Host Settings page in the File Upload Extensions field. If you are going to allow your users to upload files, you should be careful as to the types of files allowed because users may introduce viruses or other undesirable files into your portal file system. The application offers no default protection in this area, so diligence is needed to protect the integrity of the system.

Events Module

The Events module enables you to announce upcoming events to your users.

FAQs Module

You can use the FAQs (Frequently Asked Questions) module to answer questions users may have about your web site or products. It is one of the simpler modules in DotNetNuke, but it's also one of the more powerful ones because it can save you many hours of replying to e-mails. The interface for adding a new FAQ is quite simple and warrants little discussion. Basically, you enter a question you want to provide an answer for and then enter the answer. The module enables you to use the Rich Text editor to format your questions and answers in a way that is easy for your users to understand and to convey the intended message.

Feedback Module

The Feedback module offers you a mechanism for allowing users to contact you without exposing your e-mail address to the many spam bots that regularly scan the Internet. The module does not have an Add function like the other modules because the purpose of the module does not require that functionality. Basically, users are adding feedback when they send you e-mails. The module contains some settings to control its display to users and to specify the address to which the e-mails are sent. Prior to version 3 of the portal, the only option was to send these requests to the administrator account. Now you can change this behavior. One thing to be aware of is that this module relies on the mail server settings on the Host Settings page to function properly. Ensure that you have successfully added your mail server and tested the settings before attempting to utilize this module's functionality. You also have the option of setting the width and rows of the Feedback module to control its display

IFrame Module

The IFrame module enables you to display web pages from other web sites in your portal. When you set the page, the module should display and add an IFrame tag to your page and load the remote site into the frame. One of the main uses for this module mentioned in the DotNetNuke forums is to utilize legacy applications that were created with ASP or some other dynamic language that must still be used for some functionality. This enables companies to take advantage of the benefits of DotNetNuke while still using other functionality of previous applications. This usually is a short-term fix — as companies become more familiar with DotNetNuke module development, they can convert their legacy applications to fully compliant DotNetNuke modules to take advantage of full integration with DotNetNuke roles and user control functions.

Image Module

As its name suggests, the Image module offers an easy way to add images to your portal. The module enables you to add an image to a page where it would not make sense to have a skin element and you do not require the capability to link to another site from the image. The image you display can reside either in your portal file system or on an external resource.

Links Module

The Links module is likely one of the most used modules in DotNetNuke installations — it probably is only used less than the Text/HTML and Announcements modules. As its name suggests, this module enables you to add links to enable users to navigate to other areas of your site or to remote web sites.

You have several options for controlling the behavior and view of the Links module. The Control Type radio buttons enable you to define whether the link list displays as a drop-down list or a normal, databound list. You also have the option of controlling the orientation of the list with the List Display Format option. The last option, Display Info Link, enables you to show users a short description of the web page to which the link navigates, which is useful because it allows some additional keywords to be associated with the link.

The text you enter in the Title field is what users will see as the link. As with other modules, the Link Settings offer options for linking to an external resource, a page on your site, or an internal file in your module, and the audit controls let you track your visitors' behavior. The Description field contains the text you would enter if you selected the Display Info Link option. The View Order option enables you to specify the order in which your links are displayed.

News Feeds (RSS) Module

The News Feeds (RSS) module enables you to consume RSS content from another resource and display it to your users. Many web sites offer syndicated feeds that you can consume and display relevant content for your portal, some of which are free and some of which require a fee to consume. With the News Feeds (RSS) module, you can use both types of feeds and display the information according to your feed style sheet

The News Feed Source is the location of the source you want to consume. You also have the option of specifying the style sheet to use with the feed. Most news feeds provide a style sheet designed specifically for their feed, or you can specify your own style sheet. In addition, some feeds require you to present credentials authorizing access to their content before you can consume a feed. The Domain\username and Password text boxes are where you enter this type of authentication information.

Text/HTML Module

The Text/HTML module — "HTML mod" for short — is probably one of the most-used DotNetNuke modules. It enables you to format your content with the easy-to-use FreeTextBox editor and also allows a large amount of content to be displayed. This module also fits with what most webmasters need for their content display. You have the option of using the editor or, if you're a hard-core HTML programmer, you can type in your HTML directly without relying on the controls rendering your markup. The Text/HTML module's interface is straightforward and includes only two controls.

The first option is where you will enter your content to be displayed in the module, and the second is a search summary. The DotNetNuke search functions are capable of indexing all the content in this module. The type of content entered in this module may become quite large, so the Core Team felt it would be pertinent to allow a mechanism for the module administrator to add a summary of the content for the search engine to use. This accomplishes two functions. First, it enables you to provide the gist of the content that will be displayed to users when they search for similar content and, second, it helps with the performance of the search engine because there is no need to index all the content that may appear in this type of module.

User Defined Table Module


The User Defined Table is a catch-all type of module that enables you to define your own data type and display that information to users in an organized manner.

XML/XSL Module

The XML/XSL module enables you to display XML data from an external data source in your portal according to the accompanying XSL transformation file. It further increases the type of data you can display in your portal and is limited only by the XML technology and your imagination.