<<

. 30
( 87 .)



>>

</td>
</wps:if>
P1: FCH/SPH P2: FCH/SPH QC: FCH/SPH T1: FCH
WY009-08 WY009-BenNatan-v1.cls May 9, 2004 15:56




Tailoring the Portal Web Design 161


De¬ning Your Own Skins
Skins are less powerful constructs than themes. For this reason they are
much easier to generate, but on the ¬‚ip side it might not be as important to
you to change the skins available in WebSphere Portal.

Creating a New Skin
To create a new theme, we have to go back to the directory <WAS ROOT>/
installedApps/<HOSTNAME>/wps.ear/wps.war where skins are lo-
cated. As was the case with themes, you need to create a directory under the
directory skins. In the new directory you need to place the JSP and image
resources for your skin. The only mandatory ¬le is Control.jsp, a JSP
¬le de¬ning the behavior of the skin. Essentially, this JSP uses several WPS
tags to determine the portlet status (for example, minimized, maximized),
and to generate the needed HTML appearance, using several images. Each
of the preinstalled skins includes several images as needed, for the title bar
buttons, the title bar background, and for window borders.
Once you have a new directory, say New Skin, ready with your
Control.jsp ¬le and any images needed, you may follow these steps
to install it into WebSphere Portal:
1. Click the Administration button on the main toolbar.
2. Click Portal User Interface.
3. Click Themes and Skins.
4. You will now see the window as shown in Figure 8-6. Click Add New
Skin.
A new window will be shown. Here you need to follow these steps:
1. Enter the skin name, for example, New Skin.
2. Enter the skin directory name, in our case New Skin (note this is a
relative path).
3. You may click Set Locale-Speci¬c Titles to choose local-speci¬c names
for this theme.
4. Select OK.
To use the skin, you need to add it to your portal default theme as dis-
cussed above.
Just like themes, you may edit skins (but only to change their names), and
remove them. Also, you can provide a preview of skins in a ¬le
preview.gif in the skin directory.
P1: FCH/SPH P2: FCH/SPH QC: FCH/SPH T1: FCH
WY009-08 WY009-BenNatan-v1.cls May 9, 2004 15:56




162 Chapter 8


Modifying Styles
CSS style sheets are an essential tool in designing Web pages. For this reason,
the Styles.css ¬le is part of each theme. This ¬le de¬nes a set of styles
used in HTML ¬les generated by the portal. You may change some of the
font, color, and layout de¬nitions given in the ¬le to control the look and
feel of portlets including the IBM administration portlets.
For example, the color in which active links and visited links are shown
can be modi¬ed by changing the color de¬nitions in the following snippet
out of the Styles.css ¬le:
a, .wpsLink, a:active, .wpsLink:active {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: x-small;
color: #3366CC;
}
a:visited, .wpsLink:visited {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: x-small;
color: #666699;
}




Summary
In this chapter we learned how to customize the portal Web design. The
portal Web design can be customized with themes, skins, and styles. You
learned how to create new themes and skins, and how to modify them.
In the next chapter we will discuss personalization in WebSphere. Some
level of personalization is provided in the Portal Server by allowing users
to customize pages with themes and skins. IBM takes personalization to the
next level with WebSphere personalization as described in the next chapter.
P1: FCH/SPH P2: FCH/SPH QC: FCH/SPH T1: FCH
WY009-09 WY009-BenNatan-v1.cls May 18, 2004 21:54




CHAPTER

9
WebSphere Portal
Personalization

The evolution of Web applications in general and Portals in particular places
a lot of emphasis on the issue of personalization. Personalization is the
process of producing and delivering individually tailored content based on
previous information associated with a speci¬c user.
Personalizing your portal in an appropriate way you can have the dis-
tinct advantage of making information and tools more accessible to users.
As the quantity of Web-based content grows, the importance of ¬ltering
information and providing each user with the most relevant content be-
comes crucial. User loyalty and satisfaction tend to grow as content gets
more personalized.



WebSphere Personalization
The need for customizing Web page content is a common thread in many
applications. For example, in the e-commerce realm, it is important to pro-
vide customers with personalized recommendations and advice.
Generating personalized content from within a Web application is not
very dif¬cult. You can plug in a couple of “if” statements into your JSP to
achieve some crude form of personalization. Personalization becomes a bit
more dif¬cult to tackle when you need to apply complex considerations
in the customization of content. Alternatively, you might want to apply
certain personalization processes across several applications, and to allow
nonprogrammers to manage the personalization process.
WebSphere Portal Server provides some form of personalization through
its out-of-the-box functionality as described in the previous chapter. The

163
P1: FCH/SPH P2: FCH/SPH QC: FCH/SPH T1: FCH
WY009-09 WY009-BenNatan-v1.cls May 18, 2004 21:54




164 Chapter 9


portal may allow users to customize the layout and themes for portlets and
pages, and different content can be delivered to different users by using
access control.
Personalization is essentially a process of matching content to users,
based on well-de¬ned attributes of users and of content. IBM WebSphere
Personalization provides a framework that facilitates content personaliza-
tion based on previous user interactions with the system. To this end, it
provides a way to track users and analyze their activities, as well as store
content in a manner that facilitates matching it against user attributes.
The personalization support in WebSphere allows you to use two differ-
ent technologies: rules-based personalization and recommendation-based person-
alization.
Rules-based personalization relies on having a person de¬ne a set of
business rules that determine which content is displayed for a given user.
Rules-based personalization is tightly integrated into the WebSphere Portal
Server.
Recommendation-based personalization uses a technology called collab-
orative ¬ltering, implemented in a recommendation engine. The recom-
mendation engine uses complex statistical models and other techniques to
learn the usage patterns of a Web application or Web site in order to provide
personalization without the need to provide explicit rules.


Rules-Based Personalization
As the name suggests, rules-based personalization involved using rules to
determine what content to present to a given user. To this end, rules-based
personalization requires three kinds of resources: users, contents, and rules
to map users to content.
The basis for personalization is collecting and maintaining information
regarding users. The collection of all the pieces of information relating to one
user is referred to as a user pro¬le. User information can be collected either
directly from the user (via a user-pro¬le form) or from other sources, such
as tracking the user™s online activities. Users can be grouped into categories
to facilitate personalization.
Web content consists of the full array of data delivered through the portal,
such as JSP, and static HTML or XML pages. It is important to note that on
a typical portal page only a portion of the page need be personalized. In
other words, some parts of the page are static, and the remainder of the
page consists of “spots” where personalized content is to be placed.
Personalization rules allow nonprogrammers to specify what content to
show in a “content spot” based on a user pro¬le. For example, consider the
P1: FCH/SPH P2: FCH/SPH QC: FCH/SPH T1: FCH
WY009-09 WY009-BenNatan-v1.cls May 18, 2004 21:54




WebSphere Portal Personalization 165


following simplistic illustration of rules in a credit-card company customer
portal:
When UserType is Platinum_member, Show Platinum News
When UserType is Gold_member, Show Gold News

In order for these rules to work, there must be a way to identify whether
a member is a platinum card holder or a gold card holder. Furthermore,
content should have an indication of whether it belongs to platinum news
or gold news.


Resources
In WebSphere personalization, both users and content are considered per-
sonalization resources. Each resource has one or more ¬xed attributes de-
¬ned by the schema for the resource. For instance, the user data schema may
include the name, address, and phone number of a customer visiting your
Web site. A schema for Web content includes attributes about the content,
indicating to which Web visitors it is relevant. Typically the content itself is
accessible via a URL, which will be part of the schema.
There are two ways to go about creating and managing resource in Web-
Sphere personalization. One way is to use the WebSphere Portal user and
content wizards in WebSphere Studio Application Developer. The other
option is to provide Java classes implementing the resource class APIs.
Clearly, personalization requires having permanent storage of both user
and content resources. Resources are stored in a content repository, and are
loaded into the Portal Server by the Resource Engine. In WebSphere Portal
Server 5.0, the Resource Engine is shared with WebSphere Portal Content
Publishing (WPCP). Going forward, WPCP is taken out of the WebSphere
Portal Server distribution, and it would be replaced with Aptrix/Lotus
Workplace Web Content Management. In addition, it seems likely that at
some point IBM will adopt the JSR 170 standard for content management,
thus removing the need for the Resource Engine. Content Management in
WebSphere Portal is discussed in detail in Chapter 11.


Content Spots
The result of personalization is the delivery of personalized content. This
content is concentrated in content spots. Content spots usually do not take
up the full space on a page, as some content need not be personalized (for
example, a company logo would appear on every page regardless of the
individual user). Technically speaking, a content spot is a Java wrapper bean
that is placed inside your Web page. This bean is essentially a placeholder for
P1: FCH/SPH P2: FCH/SPH QC: FCH/SPH T1: FCH
WY009-09 WY009-BenNatan-v1.cls May 18, 2004 21:54




166 Chapter 9


a rule, and can invoke the rule to display personalized content or perform
data updates.
The following JSP code snippet illustrates the use of such beans within
a JSP. In this example we assume a bean called HelloContentSpot provides
a message, which is based on user classi¬cation. To retrieve the content
derived from the rule, the method getRuleContent is invoked.
()

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<TITLE> Sample Personalized Page </TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<jsp:useBean class="HelloContentSpot"
id="helloContentSpot">
<% helloContentSpot.setRequest(request); %>
</jsp:useBean>
<%= helloContentSpot.getRuleContent()%>
</BODY>
</HTML>



De¬ning Rules
Rules de¬ne interactions between your Web site and users. Rules are struc-
tured as easy-to-read statements, in order to make rules accessible to non-
programmers. WebSphere personalization introduces the concept of cam-
paign to group together a set of rules, which are used to achieve a certain
goal over a de¬ned period.
To de¬ne new rules, you need to perform the following actions:

1. Go to the Personalization entry under the Content Publishing tab.
2. Select Rules on the left-hand panel.

<<

. 30
( 87 .)



>>