Skip Headers

Oracle® Application Server Portal Developer's Guide
10g (9.0.4)
Part No. B13922-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous Next  

1 Understanding Portlets

This chapter explains portlets, the anatomy of a portlet, and provides an overview of the various portlet-building tools available in OracleAS Portal:

1.1 Introduction to Portal Development

OracleAS Portal enables you to present information from multiple, unrelated data sources in one, organized view. This view, a portal page, can contain one or more components—called portlets—that can each get their content from different data sources.

OracleAS Portal has all the tools you need for developing portlets and adding them to your portal pages. Portal's tools support a wide range of development skill: from the novice business developer to the experienced IT programmer. You can develop portlets either declaratively, through the Portal user interface, or programmatically, through Portal's collection of application programming interfaces (APIs), known as the Oracle Application Server Portal Developer Kit (PDK). Additionally, you can develop portlets through other development tools, external to OracleAS Portal, and integrate them through the PDK and a Portal entity called a provider. To learn more about providers, refer to Chapter 2, "Portlet Technologies Matrix".

This chapter defines portlets, lists and describes some sources for pre-built portlets and resources for building portlets, and suggests the best resource for the job.

1.2 Understanding Portlets

A portlet is a reusable, pluggable Web component that can draw content from many different sources. A typical portlet is one that displays summaries of Web content.

Figure 1-1 Portlets on the My Oracle Home Page

Shows portlets on My Oracle dot Com.
Description of the illustration example_portlet.gif

For example, in your portal you may have a news feed portlet that supplies linked news article headlines that are each accompanied by a sentence describing the content of the article (Figure 1-2).

Figure 1-2 The Oracle News Portlet on the My Oracle Home Page

Shows Oracle News portlet on my.oracle.com.
Description of the illustration o_news_portlet.gif

Users click the linked headlines to get to the full text of the article, which is hosted on an external news service (Figure 1-3). The portlet has a somewhat dynamic nature in that headlines change automatically as news stories are added and removed at the source.

Figure 1-3 Content Target from a Portlet Link

Shows content target from a portlet link.
Description of the illustration portlet_target.gif

Portlets provide a seamless, single view of data that originates from multiple sources. Since different portlets can be placed on a common page, the user receives a single-source experience. In reality, the content is derived from multiple sources.

Portlets display excerpts of other Web sites, generate summaries of key information, perform searches, and access assembled collections of information from a variety of data sources.

1.3 Portlet Anatomy

A portlet on a page is rendered in an HTML table cell. A portlet can display various types of content, such as HTML, formatted text, images, or elements of an HTML form.

Figure 1-4 shows the anatomy of a portlet, which includes a header that contains the portlet title. You can create a hyperlink in the portlet title, so that when a user clicks the title, the portlet displays in a full browser page. A portlet can also include a border, to distinguish the layout from other portlets on the page.

Every portlet includes three links: Customize, Help, and About. The portlet developer can expose these links to the page designer, who can then turn these on or off. Clicking the Customize link displays a number of options where the end user can personalize various attributes of the portlet. Clicking the Help link display a window containing help text that you can create to assist the end user with the portlet. Clicking the About link displays a window that you can create to describe the contents of the portlet.

Each portlet also contains the standard collapse icon, which the end user can click to collapse or expand the portlet on the page.

1.4 Portlet Resources

Portlet resources include the many pre-built portlets available out-of-the-box from many sources, including OracleAS Portal, Oracle E-Business Suite, and third-party sources. Portlet resources also include portlet-building tools available through the Portal user interface as well as from the PDK and other Oracle tools. Each of these tools offers different product features that are targeted towards different developer roles.

This section describes different portlet resources, suggests the level of expertise required to use them, and provides examples of when they might best be used. It includes the following subsections:

This section introduces you to the various portlet resources. For specific information on each tool and its benefits, refer to Chapter 2, "Portlet Technologies Matrix".

1.4.1 Out-of-the-Box Portlets

Figure 1-5 The Portlet Repository

Shows the portlet repository.
Description of the illustration repository.gif

What Is It?

Out-of-the-box portlets are fully developed, registered portlets that are immediately available from the Portlet Repository when you install OracleAS Portal (Figure 1-5). They include such portlets as Search, Saved Searches, Favorites, and My Notifications.


Note:

You'll find information on the pre-built portlets in OracleAS Portal in OracleAS Portal User's Guide, available on the Oracle Application Server documentation CD and on Portal Center (http://portalcenter.oracle.com, then click the Search icon in the right-hand corner of any page).

Who Is the Intended User?

Out-of-the-box portlets are best suited for use by end users and page designers, though they are available to users at all levels of expertise.

When Should It Be Used?

Use out-of-the-box portlets when your needs are satisfied by the functions the portlets offer, and the level of customization readily available is sufficient to complete the desired task.

Consider alternatives when you need to extend or customize the portlet, for example, you must change the user interface, or when the functionality you require is not available out of the box.

1.4.2 Other Sources of Pre-Built Portlets

What Is It?

Other sources of pre-built portlets include partner portlets, integration solutions, and the Portal Knowledge Exchange.

Partner portlets are available through Oracle's partnerships with different types of leading system integrators, software vendors, and content providers. You can access these portlets through the Portal Catalog, available on Portal Center (http://portalcenter.oracle.com). Examples of these include portlets for:

  • Generating point-to-point driving directions

  • Accessing IT information from a wide variety of sources

  • Viewing summary information on news, stocks, and weather

Portal Center also provides integration solutions that are useful for customers who require basic functionality for popular applications such as Microsoft Exchange, Lotus Notes, SAP, IMAP, SMTP, and the like.

The Portal Knowledge Exchange, also accessible on Portal Center, is an offering from Portal Developer Services. Community members exchange portal expertise that includes portlet samples, tips, white papers, sample code, and the like. Members receive a personal folder on Portal Center, which they can use to upload portlet code and portal development insights and download and rate contributions from other developers.

Who Is the Intended User?

Fully developed, downloadable portlets are best suited for use by end users and page designers who understand how to download, install, and register Web and database providers in OracleAS Portal. They are available for use by all levels of experience.

When Should It Be Used?

Just like out-of-the-box portlets, use pre-built portlets from other sources when your needs are satisfied by the functions the portlets offer, and the level of customization readily available is sufficient to complete the desired task.

Consider alternatives when you need to extend or customize the portlet, for example, when you must change the user interface or when the functionality you require is not available out of the box.

1.4.3 Web Clipping

What Is It?

Web Clipping is a generic portlet for clipping all or a portion of an existing HTML page and reusing it as a portlet. Basic and HTML-form-based sites may be clipped.

To create a Web Clipping portlet, the portal page designer uses a Web browser to navigate to the Web page that contains the desired content. Through the Web Clipping Studio, users can drill down through a visual rendering of the target page to choose just the content they want (Figure 1-6 and Figure 1-7).

Figure 1-6 Selecting Web Content through the Web Clipping Studio

Shows selected content via Web Clipping Studio.
Description of the illustration wc_studio01.gif

Figure 1-7 Clipped Content Rendered as a Portlet in Portal

Shows clipped content rendered as portlet in Portal.
Description of the illustration wc_studio03.gif


Note:

In our examples (Figure 1-6 and Figure 1-7), the image is one that changes with each page refresh. That functionality is preserved in our clipped portlet. Consequently, the images in the two figures are not the same.

Web Clipping portlets support:

  • Navigation through various styles of login mechanisms

    This includes form- and JavaScript-based submission as well as HTTP basic and digest authentication with cookie-based session management.

  • Fuzzy matching of clippings

    If a Web clipping gets reordered within the source page, or if its character font, size, or style changes, it will still be identified correctly by Portal and delivered as the portlet content.

  • Reuse of a wide range of Web content

    This includes basic support of pages written with HTML 4.0.1, JavaScript, applets, and plug-in-enabled content that has been retrieved through HTTP GET and POST (form submission) methods.

  • Use of information from external Web sites

    This includes integration with external applications, which enables you to leverage Oracle Application Server Single Sign-On and clip content from authenticated external Web sites.

  • Inline rendering

    You can set up your Web Clipping portlets to display links within the context of the portlet. So, when a user clicks a link in your Web Clipping portlet, the results display within the same portlet. You can use this feature with internal and external Web sites.


Note:

Starting with the Oracle Application Server Portal Developer Kit (9.0.4.0.2), the Web Clipping provider enables users to migrate their existing from URL-based portlets to Web Clipping portlets. Users can also integrate with external applications. For more information, refer to Portal Center (http://portalcenter.oracle.com).

Who Is the Intended User?

Web Clipping is best suited for use by page designers who want to leverage an existing Web page for rapid portlet development. The Web Clipping portlet is accessible in the Portlet Repository, and is therefore available to all users with access.

When Should It Be Used?

Use Web Clipping when you want to copy content from an existing Web page and expose it in your portal as a portlet. Consider alternatives if you want to change the way information is presented in the clipped portlet. That is, you don't need to control the UI or application flow, and you are accessing Web-based applications. For a greater level of control, use the OracleAS Portal OmniPortlet's Web page data source in lieu of Web Clipping.

Here are some examples of when you may consider using the Web Clipping portlet:

  • Stock chart portlet. Suppose you want to create a portlet that displays the stock market's daily performance chart from your financial advisor's Web site. You could clip this information from an external Web site, even if your company is using a proxy.

  • Personalized weather portlet. Suppose you want to create a portlet that displays weather information from a major Internet weather site, and you want your users to be able to personalize the portlet by providing the desired zip code.

  • Web mail portlet. Suppose your users want to access their confidential Web mail accounts via a portlet, and their inboxes to display in the portlet.

1.4.4 OmniPortlet

Figure 1-8 An OmniPortlet Using Tabular Format

Shows an OmniPortlet using tabular layout.
Description of the illustration pdg_omni_laytb_ex.gif

What Is It?

The OracleAS Portal OmniPortlet is a declarative portlet-building tool that enables you to build portlets against a variety of data sources, including XML files, comma-separated value files (e.g., spreadsheets), Web Services, databases, Web pages, and SAP data sources. OmniPortlet users can also choose a pre-built layout for the data. Pre-built layouts include tabular, news, bullet, form, or chart.


Note:

You'll find information about OmniPortlet on Portal Center, (http://portalcenter.oracle.com).

Who Is the Intended User?

OmniPortlet is best suited for use by page designers and developers.

When Should It Be Used?

Use OmniPortlet when you want to build portlets rapidly against a variety of data sources with a variety of layouts. Consider alternatives when you want complete control of the design and functionality of the portlet.

Here are some examples of when you may consider using OmniPortlet:

  • RSS news feed portlet. Suppose you want to create a portlet that displays live, scrolling news information to your users. The data comes from a Really Simple Syndication news feed, such as the Oracle Technology Network Headlines. You also want the portlet to contain hyperlinks to the news source.

  • Sales chart portlet. Suppose you want to present up-to-date information on your company's sales results. You also want to display data in the form of a pie chart, and your company stores its sales information in a remote relational database.

  • SAP portlet. Suppose you want to display information from a company's SAP system. To minimize the load on the company's SAP Business Suite, the information retrieved from the system must be cached on a per user basis for the entire day.

1.4.5 Portlet Builder

Figure 1-9 Sample Form, Report, and Chart from the Portlet Builder

Shows form, report, and chart from Portlet Builder.
Description of the illustration samp_frc.gif

What Is It?

OracleAS Portal includes a number of portlet-building wizards that are accessible through the Provider tab in the Portal Navigator. These wizards can be used to build charts, reports, forms, calendars, and lists of values.

When Should It Be Used?

It is recommended that you use OmniPortlet as an alternative to Portlet Builder whenever possible. OmniPortlet provides more flexibility and a separation of data and layout which allows you to change from a report to chart without re-creating the entire portlet (as is required with Portlet Builder). OmniPortlet also provides more options for deployment to many different portals simultaneously. OracleAS Portal will continue to support Portlet Builder as a portlet building option. However, new features and enhancements will be directed toward the OmniPortlet tool.

For more information on Portlet Builder, refer to Appendix A, "Building Portlets with the Portlet Builder".

1.4.6 Programmatic Portlets

What Is It?

The OracleAS PDK contains a set of portlet-building APIs that you can use to create programmatic portlets.


Note:

You'll find more information about these APIs on Portal Center (http://portalcenter.oracle.com).

Who Is the Intended User?

These tools are best used by experienced and knowledgeable IT developers.

When Should It Be Used?

Use the PDK when you have very specialized business rules or logic and when you require customized authentication, granular processing of dynamic results, and complete user interface control. Additionally, use the PDK when:

  • You're building a portlet from the start and need complete control over all of its functionality.

  • You know Java or PL/SQL.

  • You'd like a functioning starting point.

  • You are comfortable with the PDK and the configuration of OracleAS Portal Providers.

Consider using this approach when the out-of-the-box declarative tools do not address your needs.


Note:

The PDK-PL/SQL is not described in detail in this manual. For specific information on the PDK-PL/SQL, refer to the Developer Services area on Portal Center (http://portalcenter.oracle.com).

Here are some examples of when you may consider using Java portlets created with Oracle Application Server Portal Developer Kit:

  • Discussion forum portlet. Suppose you want to create a portlet that integrates your company's JSP-based discussion forum application with OracleAS Portal. The discussion forum posts are stored in a relational database. The portlet must also follow the strict look and feel of your company's Internet Web site.

  • Email portlet. Suppose you want to create a portlet that enables users to send email from the company's intranet portal. You must integrate the email portlet with the company's LDAP server so that the users can use the address book on the LDAP server.

1.4.7 Deciding Which Tool to Use

Figure 1-10 illustrates the spectrum of portlet resources described in the previous section. Notice how one end of the spectrum is geared towards a page designer while the other end speaks to the portlet developer. You can choose your tool depending on which type of user mostly closely approximates your expertise.

Figure 1-10 Portlet Resources from Page Designers to Experienced Developers

Shows spectrum of portlet resources.
Description of the illustration spectrum.gif

1.5 Summary

In this chapter, you learned what portlets are, as well as the various technologies available in OracleAS Portal. For more information on these tools and technologies, refer to Chapter 2, "Portlet Technologies Matrix".