Wednesday, September 7, 2011

Performance guidelines for themes and skins

Use the following guidelines when making decisions that affect the development of your custom themes and skins. These guidelines describe the relative path length involved with the inclusion of various components of themes and skins. A number of the following changes are already implemented in the Portal theme. However, the functionality described is still supported and may have an impact on your design choices for your theme. To further aid in your design decisions, the Portal theme's approach to each guideline is listed in the following table:

Guidelines for a lightweight theme

Guideline

Effect on functionality

Effect on performance

Portal theme approach

Remove Show tools icon from the toolbar

Prevents users from displaying icons on pages and portlets used to arrange or remove content on the page.

High impact on pathlength required to generate the page

Show tools options are included through asynchronous context menus.

Remove enrollment icon from the toolbar

Prevents new visitors to the site from creating a new account for themselves.

High impact on pathlength required to generate the page

Enrollment included through asynchronous context menu.

Remove self care icon from the toolbar

Prevents users from updating account information.

High impact on pathlength required to generate the page

Edit Profile included through asynchronous context menu.

Remove AdminLinkBarInclude.jsp

Removes context-sensitive links that allow authorized users to create a new page, edit the current page, or assign permissions to the current page.

High impact on pathlength required to generate the page

These options are included through asynchronous context menu.

Remove and supporting code

Removes the ability for users to bookmark pages in the portal for quick retrievability

High impact on pathlength required to generate the page

Not included in the theme.

Shrink lines of text to remove white space

With some editors, white space might be used to aid in readability during theme development

Low impact on bandwidth required to transmit the page.

JSPs are left uncompacted for readability.

Change all HTML comments to JSP comments

None

Low impact on bandwidth required to transmit the page.

Mostly JSP comments used.

As noted earlier, not all of the above guidelines for the Portal theme may apply to all the available themes for WebSphere Portal. For example, the following guidelines do not apply to the Tab Menu - Page Builder theme:

  • Remove Show tools icon from the toolbar
  • Remove AdminLinkBarInclude.jsp
  • Remove and supporting code

Guides for a lightweight skin

Guideline

Effect on functionality

Effect on performance

IBM Skin approach

Remove minimize, restore, and maximize buttons

Prevents users from manipulating the size and state of the portlets on the page

High impact on pathlength required to generate the page

These options are included through asynchronous context menu.

Place the JSP tags for the Back, Edit, and Configure icons inside the tag.

No impact to users. Prevents unauthenticated (anonymous) users from attempting to access resources that are protected. For users that are logged in, this adds an extra JSP tag for processing. Processing of the tag has much less impact on performance than the access control checks to determine if a user has access to Edit and Configure portlet modes.

Medium impact on pathlength required to generate the page

None.

Shrink lines of text to remove white space

With some editors, white space might be used to aid in readability during skin development

Low impact on bandwidth required to transmit the page.

JSPs are left uncompacted for readability.

Remove drag and drop tags.

Users will be unable to drag and drop portlets on a page or from the Portlet Palette onto a page.

Medium impact on bandwidth required to transmit the page.

None.

Change all HTML comments to JSP comments

None

Low impact on bandwidth required to transmit the page.

Mostly JSP comments are already used.

As noted earlier, not all of the above guidelines for the IBM skin may apply to all the available skins for WebSphere Portal. For example, the Tab Menu - Page Builder theme does not use drag and drop tags. It uses the Dojo drag and drop framework. Hence, the Remove drag and drop tags guideline does not apply to the Tab Menu - Page Builder and the corresponding skins.

Note: If your starting point is the IBM skin, remember that portlet context menus are loaded asynchronously and the changes to the options available mentioned below (removing window state choices, surrounding in tag) will not affect the initial page size. The changes will affect the size of the page required to generate the contents of the portlet context menu.

Static resources

If possible, any CSS or Javascript that is included either in a theme, skin, portlet application, widget, or by any other extension should be built together either at buildtime or runtime, and then minimized and compressed to remove comments and unnecessary whitespace. This decreases the overall size of these files, reduces the number of HTTP requests the browser must make to aggregate the page, and reduces the load on the Web servers and Portal server. Using CSS sprites in themes, skins, and portlets can improve performance as well for the same reasons.

1 comment:

Anonymous said...

Thanks for sharing such an informative post among the users.I am very thankful to you and waiting for more of your articles.
website design