Overview: | A description of the "FENG-SHUI" architecture for flexible branding, navigation, and look-and-feel, developed for the GPMS Portal |
Author: | Rich Fozzard |
Last Updated: |
The GPMS Portal team was asked to support a high degree of flexibility in the user interface of its products. For example, we might need to have the same underlying Java code and XML vocabulary support different:
To get an idea of the requirements, here is a sample page from the application:
Global Navigation stuff (Menus) here
Look-and-feel unique to Organization (Service Provider or Service Consumer) Navigation options filtered by Organization and Security Role |
|
Local Navigation stuff (Menu Items) here
Welcome, Tom Cruise of EyesWideShut.com!Look-and-feel unique to Organization (Service Provider or Service Consumer),Navigation options filtered by Organization and Security Role |
Creamy Center stuff here
Modify Storage |
On this page, the central portion (containing a form to modify a consumer's storage allocation) is determined by the 'requestName' sent to the Request Handler. The peripheral portions of the page contain branding and navigation that is organization-specific and document-type-specific (logo, background color, etc.) The navigation options are filtered by the privileges assigned to the current user (sometimes referred to as the Actor).
The solution we came up with is FENG-SHUI: a Flexible, Extensible, Next Generation, Scalable, Hierarchical User Interface. Okay okay, so the acronym is kind of hokey. But it's the architecture that counts here, so let's roll the video tape!
Conceptually, pages in Portal can be understood as nested tables (which is what they are in HTML) with the following layout:
__________________________________________ | | | outer top | |__________________________________________| | | | | | | | | | | | | | | | | | | | outer | CONTENT AREA (Body) | | left | | | | a.k.a | | | the creamy | | | center | | | | | | | | | | | | | |________|_________________________________||The current design uses only the "outer top" and "outer left" for the Global Navigation and Local Navigation areas, repectively. This structure could be easily extended to support even more complex page layouts (e.g, a set of "inner" top, left, right, and bottom cells).
The various branding/navigation areas of the page are handled by Page Area Templates (PATs), image, and CSS files that reside in a directory hierarchy on the file system under the web server's documentRoot (so that images and .css files can be referenced). [We haven't yet finalized how the HTML files generated by the Help system will be handled, but they will also probably be in this same directory hierarchy.]
The 'requestName' part of PAT file names identifies the particular web page being requested for display (e.g., a viewOrganizationDetails page).
The final HTML snippet for each cell is generated by the PAT, and the page assembled from the cells by XSL from (X)HTML "snippets" existing in the hierarchical directory structure.
The structure and relevant files are:xml/ dtds/ (DTDs of message content to be transformed) xsl/ bodypat.xsl (message processing and error handling used by all PATs) gpmsproperties.xsl (property file paths and convenience templates) default/ (this directory is used if [orgKey] is not present) [locale]/ (the region and country codes; eg. US-EN) ... (rest of default/ hierarchy is same as [orgKey] below) [orgKey]/ (the Organization's unique key assigned at creation) [locale]/ (the region and country codes; eg. US-EN) global.xsl (PAT for Global Navigation area of page) local.xsl (PAT for Local Navigation area of page) response.xsl (PAT for the entire page, including HTML HEAD and BODY) vocabulary.xml (commonly used page tags; eg. Countries, Time Zones) css/ (CSS stylesheets for this Org/Locale) images/ (image files for this Org/Locale) error/ (custom templates for error conditions) responseError.xhtml (custom template for handling message errors from Core) [error].xsl (other error conditions; eg. validation, authentication) [topic]/ (determines which Local Navigation set is used) [requestName].xsl (PAT for the Body content area of page) help/ [note: filenames follow documentation group convention here(?)]Another way to picture this structure is to describe which files handle which areas of the page:
[orgKey]/[locale]/response.xsl (entire page) ___________________________________________________ | | | [orgKey]/[locale]/global.xsl | |___________________________________________________| | | | | | | | | | | | | | | | | | | | [orgKey]/ | CONTENT AREA | | [locale]/ | | | local.xsl | a.k.a. | | | the creamy | | | center | | | | | | [orgKey]/[locale]/ | | | [topic]/[requestName].xsl | | | | |___________|_______________________________________|
The FENG-SHUI approach has the following benefits:
If you have any questions regarding FENG-SHUI, contact Rich Fozzard at fozzard@fozzard.com