bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Development Guide

Introduction to WebLogic Portal Development

Welcome to the WebLogic Portal Development Guide. This guide shows you how to develop and deploy portals and portlets and create the resources necessary to extend their capabilities. The portal development activities described in this guide comprise the initial phase of a portal's lifecycle: creating a portal and the resources used to extend that portal. Once portal development is complete, portal administration becomes the primary concern. Administrative tasks are described in the WebLogic Portal Administration Guide.

This section includes information on the following subjects:

- A Developer's Portal Primer

- Portal Component File Locations

- Roadmap for Building a Portal

- How Do I Get Started?

A Developer's Portal Primer

A portal is a feature-rich Web site. It provides a single point of access to enterprise data and applications, presenting a unified and personalized view of that information to employees, customers, and business partners.

Portals allow you to have multiple Web applications within a single Web interface. In addition to regular Web content that appears in a portal, portals provide the ability to display portlets—self-contained applications or content—all in a single Web interface.

Portals support multiple pages with tab-based navigation, with each page containing its own content and portlets.

Portal Features

While a fully-functioning portal offers many features to the portal user that enhance their experience when using WebLogic Portal many development features likewise enhance your experience when developing portals and portal resources. This section describes some of these features.

Personalization and Authorization

Because WebLogic Portal comes with robust authentication and personalization features, administrators can determine what content a visitor can interact with and how that information will appear to the specific visitor. Visitors themselves can leverage WebLogic Portal's personalization features to select their own content and create their own look and feel. A major component of the Portal development process is to create the resources that make such authorization and personalization possible.

Group Portals

Portals are designed either for single users or for groups. With group portals you can set up delegated administration for portals and restrict portal access to specific users. You can create multiple group portals within a portal Web Application. The group portals can share portal resources, such as layouts and portlets, but can be configured differently to satisfy the needs of each group separately. Because users are designated individually as members of a group, the group portal uses a static form of personalization.

JSPs and JSP tags

As a portal developer, you can use JavaServer Pages (JSPs) to rapidly develop and easily maintain dynamic web pages that leverage existing business systems. By using JSPs, you can quickly develop web-based applications that are platform independent. By separating the user interface from content generation, JSPs allow you to change the overall page layout without altering the underlying dynamic content.

Key components of a JSP are the JSP tags, simple code that allows you to easily develop JSPs without using any Java code. JSP tags are XML-like tags and scriptlets written in Java that encapsulate the logic that generates the content for the page. WebLogic Portal ships with a vast library of JSP tags for use in such tasks as creating webflows and pipelines, building a product catalog, developing campaigns, and integrating content management systems.

EJBs

Enterprise Java Beans (EJBs) allow you to write software components that execute business logic that runs on the server. With EJB transaction and state management, multithreading, and resource pooling are left to the server implementation. In WebLogic Portal, EJBs comprise the enterprise application layer shown in Figure 1-2 and perform such functions are loading pipelines into Web applications.

Unified User Profile

In WebLogic Portal, users are represented by user profiles. A user profile employs a user's ID to access such properties for that user as age or e-mail address. A Unified User Profile incorporates user data from external data sources in addition to or instead of LDAP servers, such as a legacy system or database, so that the user can access data from many different sources through a single profile. During portal development, you will create this profile so that your Portal application can retrieve data from multiple external sources.

Other Useful Features

WebLogic Portal also provides these other features that facilitate portal development:

- A layout paradigm for dynamic, interactive, personalized content

- Content modules called portlets, laid out in rectangular grids

- The ability to personalize portlets at many levels

- The ability to save customized layout settings made by a visitor to your Web site

- The ability to define multiple views for the same group portal

- The ability to designate and customize color schemes called skins

- Delegated administration, which enables complex, distributed security implementations

Portal Component File Locations

When you install WebLogic Portal, you automatically create a file structure that represents your development environment. Figure 1-1 shows the relationship between generic portal architecture and where the files that compose the various levels reside in the file structure.

Figure 1-1 Portal Component File Locations

- Everything is built upon a domain, which is composed of an application server (for example WebLogic Server) and clustered servers. All files and directories that make up the full portal architecture are contained in the domain folder (myNEWdomain).

- The enterprise application sits on top of the domain. A domain can have multiple enterprise applications, which are characterized by a set of EJBs you can implement to create functionality in your Web applications and portals. The files and directories that make up the enterprise application are contained in the portalApp folder.

- Each enterprise application can host multiple Web applications, the basis for your portals. The files that comprise a Web application include deployment descriptors, configuration files, and the Java Archive (.jar) files that contain the logic and formatting instructions for the web application and the portal it supports. Files and subdirectories that comprise a Web application are contained in the Web application folder (newPWApp).

- The Web application also contains the logic that administers and enforces the personalization rules that help to channel the desired content to a specific visitor. These rules determine what content a visitor can interact with and how that information will appear to the specific visitor. The files that define the personalization layer of the WebLogic Portal architecture are contained in subdirectories of the portalApp-project file. These files are used in the E-Business Control Center and include configuration files for Webflow and Pipeline, events, portals and portlets, properties, and skins layouts.

- A Web application can have only one portal. This layer is the user interface of WebLogic Portal: it contains the components the visitor actually sees and interacts with when using WebLogic Portal. The files that comprise the Portal application include deployment descriptors, configuration files, and the Java Archive (.jar) files that contain the logic and formatting instructions for the Portal application. Files and subdirectories that comprise a Portal application are contained in the same folder as the Web application (newPWApp).

- The top layer of the WebLogic Portal architecture are the portlets, subsets of portals. The files that make up portlets include .jsp files and image files, such as .gif files. These files are contained in the portlets folder.

Roadmap for Building a Portal

This section describes the tasks required to create a portal and portal ressources and shows you how WebLogic Portal helps you complete those tasks. It answers these questions:

- How do I Build a Portal?

- How Can I Extend these Portals?

How do I Build a Portal?

WebLogic Portal makes developing portals and portal applications easy, whether you are building a portal for a new domain or for an existing domain. BEA provides "Wizards"— GUIs in to which you enter portal configuration and setup information—that enable you to create and configure portals and portlets without having to know Java, XML, or HTML. You simply complete the data requested by these wizards and the portal, with its requisite domain, enterprise application, Web application, and portlet, are created.

For example, if you are creating a portal for a new domain with the Domain Configuration wizard, you:

1. Create an enterprise application that will support your Web application.

2. Create a new domain for your portal application

Then, by using the Portal wizard, you:

1. Create the Web application to support your portal.

2. Create a new portal and add a portlet to that portal.

3. Deploy the portal and portlet.

Additionally, by using the Portlet wizard, you can add more portlets to your portal.

By using these wizards, you can build a functional portal in less than an hour.

Part 1 of this guide, "Portal Development Tutorial" walks you through the steps outlined above to build a new portal with a new domain and then deploy that portal. In addition, it will show you how to enable an existing domain to host a new portal.

How Can I Extend these Portals?

Once you have a portal in place, you can extend it by adding features and functionality to increase its value to your enterprise. Among the ways you can extend a portal are:

- Adding more portlets

- Adding static or dynamic content

- Personalizing it for a specific user

- Creating a navigation scheme called a webflow and enhancing the functionality of the webflow by adding a pipeline to it

- Integrating it with third party systems and services, such as LDAP servers and search engines

- Integrating it with commerce services such as payment and taxation services

- Modifying its default look-and-feel by adding skins or changing the layout.

These and many other ways of extending a portal are described in Part II, Extending Portals

How Do I Get Started?

With the basic background on portals and portlets presented in this section, you can now begin building portals. This guide is structured to allow you to both develop a portal and extend its functionality.

While the procedures contained in this guide will show you what you need to know to develop portals and portlets, you should also do some advanced planning to enable your portal to fully support your enterprise.

The following list suggests some activities you need to consider before building your portal. This list is not a comprehensive planning guide for a new portal, however it should provide sufficient guidance for getting you started.

Before actually developing a portal, you should:

- Determine the tools you will use to create, test, debug, and deploy your portals.

- Determine which business needs the portal will address and whether you need to build a new portal or modify an existing one.

- Identify the portal audience by defining users and groups.

- Identify the portal components; that is, what will be available in the portal.

- Identify portal management roles and responsibilities; that is, who are the administrators (SA, PA, GA) and what are they required to do?

- If you are developing a new portal, build the wireframes for the portal and its portlets.

- Create the HTML mock-ups of the portal and portlets to model the desired look-and-feel.

- Collect or identify the specific content and determine what processes will be required to make it available in the portal and portlets.

You are now ready to begin building your portal.