How does the portal work? – Part 1
The most important thing you must first understand is that a portal is (usually) database driven. Pages of the portal fetch data from the database to figure out what content to display and how to display it.
- Most people are more familiar with Microsoft Excel Spreadsheets than they are with how a database works.
- An Excel Spreadsheet is just like a database. They both contain columns and rows of data, and both provide ways to separate different pages of data (worksheets and tables)
A database driven website is unique from a html page based website. When the internet was first created, .html pages were the standard and at first were the only way to make websites. The internet has since evolved and new ways of presenting and displaying data have emerged.
- Most people are more familiar with Microsoft Word Documents than they are with what a .html file is.
- A Word Document is a .doc file.
- A .doc file is just like a .html file. They are both merely a single file that storage data.
- A .html page does not have any interactivity with a database: the data is 100% contained within the .html file. The .html page must take on both jobs of how to display the data, and to storage the data.
- A portal page typically contains no data, and must contact a database in order to retrieve the data that needs to be displayed. However, the portal page still has the job of how to display the data, but does not have to storage the data.
Because all data is contained within a database, all portal pages and portal code can be identical and are identical on all websites that use the portal: the only difference between any 2 websites that use the same portal is the data in their respective databases. The same can not be said for websites operating with just .html files because the data must be stored in each html file. This allows for portal websites to be created and deployed much faster and easier than a standard html website because the navigation and stylization are already finished before the website has already been created, thanks to the portal's features.
How does the portal work? – Part 2
When broken down, a website is nothing more than navigation (links), content (data), and stylization (data display and data formatting).
Navigation:
For this portal, “Tabs” are the way the navigation links are automatically created. Based on the TabID information provided in a url, a different page will be displayed with various modules assigned to that Tab.
- There is a table in the Perkulator.com database called “Tabs”.
- Within the Tabs table are many columns, one is called “Title”
- The “Title” of the tab which you are currently viewing is called “Overview”
- The “TabID” of the tab which you are currently viewing is 264
Creating and editing Tabs on this portal is done so by going to the “Admin” tab of the portal. (admin/admindefault.aspx)
Content:
“Modules” are assigned to tabs, and are basically content blocks for a Tab. Many modules can be assigned to a tab to create more content and different types of content for a page.
- There is a table in the Perkulator.com database called “Modules”
- Within the Modules table there are many columns, one is called “TabID”
- Within the Modules table there are many columns, one is called “ModuleTitle”
- The Portal searches that Modules table for all rows of data whose “TabID” value is equal to the TabID you are browsing (264).
- In this example, there are 3 rows that matched. The “ModuleTitle” value for those 3 rows were:
- Overview of the Portal
- Portal Modules
- Admin Pages
Creating and editing Module Definitions on this portal is done so by going to the “Admin” tab of the portal. Select any existing Tab in the tab editor’s ListBox. Click the “edit” (pencil) icon. Once at the Edit Tab page (admin/TabLayout.aspx), scroll down to the 2nd subsection called “Add Module”. All Module Definitions are listed in the Module Type dropdownlist. To create and edit Module Definitions, click the “edit” (pencil) icon next to that dropdownlist. (admin/ModuleDefs.aspx)
Stylization:
“Skins” has become the most common term for the way to describe a collection of files that when combined and used in a web portal or a software application, collectively define the colors, formatting, and layout of content data.
The asp.net 2.0 directory structure provides for several folder paths that allow for the defining of skin files locations. The 2 folder paths we are concerned with for now, to define a Skin for the portal are:
- App_Themes
- This folder handles stylesheet (.css) files and color specific image files
- App_Layouts
- This folder handles all skin specific module files (.ascx) and layout specific image files
The selected skin for your website is managed by going to the “Display” subtab of the main “Admin” tab.