This chapter provides an overview of portlets and describes, with help of examples, the use of portlets. It explains portlet anatomy, and the resources to create portlets. This chapter contains the following sections:
Oracle 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.
Oracle Portal has all the tools you need for developing portlets and adding them to your portal pages. Oracle Portal's tools support a wide range of development skills: from the novice business developer to the experienced IT programmer. You can develop portlets either declaratively, through the Oracle Portal user interface, or programmatically, through Oracle Portal's collection of application programming interfaces (APIs), known as the Oracle Portal Developer Kit (PDK). Additionally, you can develop portlets through other development tools, external to Oracle Portal, and integrate them through the PDK and an Oracle Portal entity called a provider. To learn more about providers, see 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.
A portlet is a reusable Web component that can draw content from many different sources. A typical portlet is one that displays summaries of Web content, as shown in Figure 1-1.
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).
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.
Portlets provide a means of presenting data from multiple sources in a meaningful and related way. Portlets can 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. Because different portlets can be placed on a common page, the user receives a single-source experience. In reality, the content may be derived from multiple sources.
In Oracle Portal 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 illustrates a typical portlet anatomy. This 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.
You, the portlet developer, can expose links such as Personalize, Help, and About, to the page designer, who can then turn them on or off. Clicking the Personalize link displays a number of options where the end user can personalize various attributes of the portlet. Clicking the Help link displays 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 refresh icon and a standard collapse icon, which the end user can click to collapse or expand the portlet on the page.
Portlet resources include the many prebuilt portlets available out of the box from many sources, including Oracle Portal, Oracle E-Business Suite, and third-party sources. Portlet resources also include portlet-building tools available through the Oracle Portal user interface as well as from the PDK and other Oracle tools. Each of these tools offers different product features that are targeted toward 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, see Chapter 2, "Portlet Technologies Matrix."
Out-of-the-box portlets are prebuilt, fully developed, registered portlets that are immediately available from the Portlet Repository when you install Oracle Portal (Figure 1-5). They include such portlets as Search, Saved Searches, Favorites, and My Notifications.
You'll find information on the prebuilt portlets in Oracle Portal in Oracle Fusion Middleware User's Guide for Oracle Portal.
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.
Use out-of-the-box portlets when your needs are satisfied by the functions the portlets offer, and the level of personalization readily available is sufficient to complete the desired task.
Consider alternatives when you need to extend or personalize the portlet, such as when you need a different user interface, or when the functionality you require is not available out of the box.
For more information on when you should use each technology, see Chapter 2, "Portlet Technologies Matrix."
Other sources of prebuilt portlets include partner portlets and integration solutions.
Partner portlets are available through Oracle's partnerships with leading system integrators, software vendors, and content providers. You can access these portlets by using the keywords
portlet when searching the Oracle PartnerNetwork Solutions Catalog:
Examples of these prebuilt portlets include portlets for the following purposes:
Generating point-to-point driving directions
Accessing IT information from a wide variety of sources
Viewing summary information on news, stocks, and weather
Portal Integration (POINT) Solutions provide solutions for customers who require basic functionality for popular applications such as Microsoft Exchange, Lotus Notes, SAP, IMAP, SMTP, and the like. These portlets are available on the Oracle Portal Integration Solutions page on OTN:
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 Oracle Portal. They are available for use by all levels of experience.
As with out-of-the-box portlets, use prebuilt portlets from other sources when your needs are satisfied by the functions the portlets offer, and the level of personalization readily available is sufficient to complete the desired task.
Consider alternatives when you need to extend or personalize the portlet, for example, when you need a different user interface or when the functionality you require is not available out of the box.
Web Clipping is a browser-based declarative tool that enables you to integrate any Web application with Oracle Portal. It is designed to give you quick integration by leveraging the Web application's existing user interface. Web Clipping has been implemented as a Web provider using the PDK-Java, which is a component of Oracle Portal.
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, the page designer can drill down through a visual rendering of the target page to choose the desired the content (Figure 1-6 and Figure 1-7).
Web Clipping supports the following:
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 the Web Clipping engine and delivered as the portlet content.
Personalization, allowing a page designer to expose input parameters that page viewers can modify when they personalize the portlet. These parameters can be exposed as public parameters that a page designer can map as Oracle Portal page parameters. This feature enables end users to obtain personalized clippings.
Integrated authenticated Web content through Single Sign-On, including integration with external applications, which enables you to leverage Oracle Application Server Single Sign-On and to clip content from authenticated external Web sites.
Inline rendering, enabling you to set up Web Clipping portlets to display links within the context of the portlet. As a result, when a user clicks a link in the Web Clipping portlet, the results display within the same portlet. You can use this feature with internal and external Web sites.
Proxy Authentication, including support for global proxy authentication and per-user authentication. You can specify the realm of the proxy server and whether all users will automatically log in using a user name and password you provide, each user will log in using an individual user name and password, or all users will log in using a specified user name and password.
Resource Tunnelling of images.
Open Transport API for customizing authentication mechanisms to clipped sites.
Security Enhancement that enables administrators to control access to content that can be clipped by the Web Clipping portlet.
Web Clipping is best suited for use by page designers and portlet developers who want to leverage an existing Web page for rapid portlet development. The Web Clipping portlet is accessible out of the box, and is available in the Portlet Repository of Oracle Portal. This portlet can be added to a page by any user with the appropriate privileges.
Use Web Clipping when you want to repurpose live content and functionality 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 user interface or application flow, and you are accessing Web-based applications. For a greater level of control, use OmniPortlet's Web page data source instead of Web Clipping.
The following are some examples of when you might consider using the Web Clipping portlet:
Stock chart portlet. 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. 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. Your users want to access their confidential Web mail accounts through a portlet and display their in-boxes in the portlet.
For more information on using Web Clipping, see Chapter 5, "Creating Content-Based Portlets with Web Clipping."
To use the Web Clipping portlet, OmniPortlet, or the Simple Parameter Form with Windows (2000 with SP4, 2003 (32 bit) with SP2/R2 or later, XP with SP2/R2 or later, Vista, and Server 2008), you must use Firefox 3.0 or later, or Microsoft Internet Explorer 7 or later.
OmniPortlet is a declarative portlet-building tool that enables you to build portlets against a variety of data sources, including XML files, character-separated value files (CSV, for example, spreadsheets), Web Services, databases, Web pages, and SAP data sources. OmniPortlet users can also choose a prebuilt layout for the data. Prebuilt layouts include tabular, news, bullet, form, chart, or HTML. HTML layout enables OmniPortlet users to write their own HTML and inject the data into that HTML. Figure 1-8 shows an OmniPortlet with a tabular format.
The SAP data source is not included with Oracle Portal. To learn more about using the SAP data source, visit the Oracle Portal Integration Solutions page on OTN:
Like Web Clipping, OmniPortlet supports proxy authentication, including support for global proxy authentication as well as authentication for each user. You can specify whether all users will automatically log in using a user name and password you provide, each user will log in using an individual user name and password, or all users will log in using a specified user name and password.
You'll find information about OmniPortlet on Portal Center. Navigate to the following URL, then click Portlet Development:
OmniPortlet is best suited for use by business users with a minimum knowlegde of the URLs to their targeted data.
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.
The following are some examples of when you might consider using OmniPortlet:
RSS news feed portlet. You want to create a portlet that displays live, scrolling news information to your users. The data comes from a Really Simple Syndication (RSS) news feed, such as the Oracle Technology Network Headlines. You also want the portlet to contain hyperlinks to the news source.
Sales chart portlet. 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. 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 for each user for the entire day.
For more information about OmniPortlet, see Chapter 3, "Creating Portlets with OmniPortlet" and Chapter 4, "Building Example Portlets with OmniPortlet."
Oracle 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 as shown in Figure 1-9.
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 enables 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. Oracle 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 about OmniPortlet, see Section 1.4.4, "OmniPortlet." For more information about Portlet Builder, see Appendix A, "Creating Portlets with the Portlet Builder."
JSF portlets are created using the JSF Portlet Bridge. The JSF Portlet Bridge enables application developers to expose their existing JSF applications and task flows as JSR 168 portlets. The portlet bridge simplifies the integration of JSF applications with WSRP portlet consumers, such as Oracle Portal.
JSF portlets do not require separate source code from that of the JSF application. Since these portlets are created using the portlet bridge, you need to only maintain one source for both your application and your portlets. Similarly, when you deploy your JSF application, JSF portlets are also deployed with it. Therefore, using the bridge eliminates the need to store, maintain, and deploy your portlets separately from your application.
JSF Portlet Bridge integrate Oracle WebCenter Services into Oracle Portal. It is only available if you are using a licensed Oracle WebCentre.
Application developers with knowledge of Faces and WSRP.
JSF portlets are best suited when application developers intend to display contents from a JSF application as a portlet without hosting the entire application, or without separately building a portlet for the same. Once portletized, the consumption of the portlet is the same as registering any WSRP provider using their provider URLs.
For more information, see Oracle Fusion Middleware Developer's Guide for Oracle WebCenter Suite.
You'll find more information about these APIs on Portal Center:
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:
These tools are best used by experienced and knowledgeable IT developers.
Use programmatic portlets when you have very specialized business rules or logic or when you require personalized authentication, granular processing of dynamic results, and complete user interface control. Additionally, use programmatic portlets when you need to satisfy any of the following conditions:
You're building a portlet from the start and need complete control over all of its functionality.
You know Java or PL/SQL.
You are comfortable with the PDK and the configuration of Oracle Portal providers.
Consider using this approach when the out-of-the-box declarative tools do not address your needs.
The following are some examples of when you might consider using Java portlets created with the Oracle Portal Developer Kit:
Discussion forum portlet. You want to create a portlet that integrates your company's JSP-based discussion forum application with Oracle 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.
E-mail portlet. You want to create a portlet that enables users to send e-mail from the company's intranet portal. You must integrate the e-mail portlet with the company's LDAP server so that the users can use the address book on the LDAP server.
For more information about using the PDK-Java, see Chapter 6, "Creating Java Portlets" and Chapter 7, "Enhancing Java Portlets." For more information about using the PDK-PL/SQL, see Chapter 8, "Creating PL/SQL Portlets."
Figure 1-10 illustrates the spectrum of portlet resources described in the previous section. Notice how one end of the spectrum is geared toward a more declarative environment as required by page designers while the other end focuses more on hand-coding and portlet developers. You can choose your tool depending on which type of environment is most comfortable and suitable for your skill-base.
For more information on deciding which tool to use, refer to Chapter 2, "Portlet Technologies Matrix".