-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Introduction
The Portal Starter Kit demonstrates how you can use ASP.NET and the .NET Framework to build either an intranet or Internet portal application. It also demonstrates a host of developer "best practices" to follow when building ASP.NET applications. Please review the code below to see how the application was architected and built.
All code contained in the Portal Starter Kit download package is free for use in your own applications.
Portal Modules
Portal modules let you organize, display and maintain data. The Portal Starter Kit provides 10 "out of the box" modules you can use. All 10 portal modules provide "desktop browser" rendering support -- meaning they can be used to target all standard html based browsers (Internet Explorer, Netscape, Opera, etc). 4 of the portal modules also provide "mobile device" rendering support -- meaning they can be used to target small mobile devices that support either HTML, WML/WAP, or CHTML rendering markup.
Each portal module UI element is implemented as an ASP.NET User Control that displays the module's data/content within a portal page. A portal module targeting mobile devices is implemented using the standard mobile controls that ship as part of the Microsoft Mobile Internet Toolkit for ASP.NET (these server controls are typically denoted with the "mobile:" tag prefix). Optionally, each portal module may also include an Edit Page to let users interactively update the data, business components to interface to the data source, and stored procedures to fetch/update the data.
Portal Framework
All configuration settings for the portal are stored within an XML configuration file -- enabling web administrators to easily deploy an instance of the portal accross multiple front-end web servers (each pulling the appropriate configuration data out of the same version of the portal configuration file). In a web farm environment care needs to be taken to replicate the latest configuration file across servers. In the method saveSiteSettings() the PortalCFG.xml file is updated making this a natural area to add replication code.
The Portal Framework code listed below uses this configuration data to control the portal's content layout (ie: what portal tabs are displayed -- and what portal modules live on each tab) and security settings (ie: user roles, access permissions, etc).
Configuration is loaded on each request from within the Portal Application's
Global.asax file using the Configuration business component. It is then used
from within either the Portal's DesktopDefault.aspx page (if the accessing
browser is an HTML desktop device -- IE, Netscape, Opera, etc) or within the
Portal's MobileDefault.aspx (if the accessing computer is a mobile device) to
correctly render a tab view of the portal.
The portal framework logic is encapsulated within 5 pages, 4 user controls, 5
class files, 2 stored procedures, the global.asax file and an XML configuration
file.
Portal Admin Tool
The Portal Starter Kit provides an online Admin tool that permits users in the "Admins" role to manage the content, layout and security of the portal. For information about how to use the Admin tool, see the "About the Portal" tab.
The Portal Admin Tool updates the portal configuration using a Configuration component, and updates User Roles using the RolesDB component. The Portal Configuration elements, such as Tab names and layout, Module definitions and settings, and Portal display name, are stored in an XML file and retrieved into a cached DataSet. The Roles, User, and Security information, as well as the individual module data, are stored in the database.