Policy naming conventions

Policy naming conventions are suggested for use with IBM® Mobile Portal Accelerator.

These naming conventions draw a close parallel to WebSphere® Portal naming conventions. This should help developers already familiar with WebSphere Portal to better understand the job of each policy. The naming conventions are used by the Mobile Portal Accelerator aggregator and XDIME portlets and are offered here as recommendations but are not enforced in any way.

Layout policy naming convention

Layout policies used by the aggregator should abide by the following naming style conventions.

Table 1. Aggregator layout policy naming convention
wp_content-area_extended-info
content-area The content-area portion of the name refers to specific areas of the screen (for example, title, header, footer, navigation, toolbar, and others).
extended-info The extended-info portion of the name refers to any additional info the developer maintaining the code may need to know at a glance.

Layout policies used by portlets should abide by the following naming style.

Table 2. Portlet layout policy naming convention
portlet_portlet-name_content-area_extended-info
portlet-name The portlet-name portion of the name describes the portlet that uses this layout. This field may be a simple name such as welcome or a java-style name such as com/tivoli/am/ui. A portlet may mix usage of custom and generic layouts.
content-area The content-area portion of the name refers to specific areas of the screen, for example, title, header, footer, navigation, and toolbar.
extended-info The extended-info portion of the name refers to any additional info the developer maintaining the code may need to know at a glance

Layouts used by the aggregator are named differently than layouts used by portlets. Portlets should not re-use aggregator layouts. This will isolate portlets from the negative side effects of changing the aggregator layouts.

Table 3. Aggregator portlet layout policy naming convention
portlet/generic/num-rowsxnum-columns
num-rows The num-rows portion of the name refers to the number of rows to be displayed.
num-columns The num-columns portion of the name refers to the number of columns to be displayed.

Panes within a layout should follow the naming convention listed here. If more than one pane of a given type is used, each pane of that type should be suffixed with a number (for example, T0, T1, and T2).

Table 4. Naming convention for panes within a layout
Pane Pane type
H Header
T Text
G Graphic
AL Action Link
P Generic Pane (potentially anything put in here).
R Region
E Error message
FI Form Input
FT Form Text
FA Form Action
FAT Form Action Text

Component policy naming convention

Component policies used by the aggregator should abide by the following naming style conventions.

Table 5. Aggregator component policy naming convention
wp_image-name_extended-info
image-name The image-name refers to the use of the image (for example, banner, logout, logo, search, and others).
extended-info The extended-info portion of the name refers to any additional info the developer maintaining the code may need to know at a glance.

Layout policies used by portlets should abide by the following naming style conventions.

Table 6. Portlet component policy naming convention
portlet_portlet-name_image-name_extended-info
portlet-name The portlet-name portion of the name describes the portlet that uses this layout. This field may be a simple name such as welcome or a unix-style name such as com/prodname/tam/ui. A portlet should provide all of the image components it intends to use. It should not re-use any Portal image components.
content-area The content-area portion of the name refers to specific areas of the screen, for example, title, header, footer, navigation, and toolbar.
extended-info The extended-info portion of the name refers to any additional info the developer maintaining the code may need to know at a glance.

Theme naming convention

The theme policy for the XDIME aggregator (which is equivalent to Styles.css in WebSphere Portal) is called wp_styles. This theme is declared in the wp_main canvas tag of the XDIME aggregator. Portlets can inherit the wp_styles theme policy from the XDIME aggregator's parent canvas. Portlets should not provide their own theme policies because device limitations prevent Multi-Channel Server from generating style rule markup that will work for all devices. Style rules needed by portlets should be included in the theme policies used by the XDIME aggregator.




Terms of use
(C) Copyright IBM Corporation 2012. All Rights Reserved.