Oracle® WebCenter Framework Tutorial 10g (10.1.3.2.0) Part Number B31072-02 |
|
|
View PDF |
This chapter introduces you to Oracle WebCenter Suite and helps you understand how you can use it to enhance your service-oriented applications. With Oracle WebCenter Suite, you get services that you can integrate with your application to afford your users improved communication, content management capabilities, customization, and advanced search support. More important, you get a development framework that provides essential capabilities, such as the ability to consume portlets and content in a Java Server Faces application, declarative security, and life-cycle management tools.
In this chapter, you will discover answers to these key questions:
After you read this chapter, you'll be ready to start building your own Java EE 5 application.
As key technologies like Wiki, RSS, and blogs change the landscape of the Internet by empowering individuals across the globe, user demand for applications that simplify transactions becomes more pronounced. One way to simplify transactions is to provide everything the user needs to support a given task within the application itself. Consider the example shown in Figure 1-1:
In this example, a user who is new to the company is working with an application that allows him to add dependents to his company insurance policy. Notice that the transaction itself is surrounded by additional context that helps the user, including:
New Hires Tasks, in the upper left corner, provide an activity guide that shows where the user is in the larger process of becoming acclimated to his new company. The user's next task is also identified. This type of process orchestration helps the user step through the entire multi-step flow quickly and easily.
Task and process analytics let users know where they are in the process and how decisions are impacting them. In this case, the Task Analytics on the right show the total cost impact of the benefit choices made so far.
The Help Center on the bottom left provides an up to date FAQ for quick access to typical questions and a direct chat link to the help center where the user can ask additional questions not addressed by the FAQ. Again, no need for the user to leave the context of the transaction to get help.
Knowledge Exchange, on the bottom right, provides documentation relevant to the current task. These documents, stored in the corporate repository, give detailed advice on the different beneficiary and dependent scenarios applicable to the user.
Until Oracle WebCenter Suite, building this kind of application was a rather tedious process. To gain access to the beneficiary scenarios, for example, used to involve creating a portlet to gain a view into the Java Content Repository (JSR 170)—if the API required to do so was available. Oracle WebCenter Suite reduces the front-end labor historically required to bring necessary business components to the user by capitalizing on the notion of Service Oriented Architecture (SOA). Thanks to Oracle WebCenter Suite's commitment to SOA, as well as to the Java Content Repository (JSR 170) and other industry standards, you get a wide range of plug-and-play products, tools, and services that make it easy to build the applications your users need.
Figure 1-2 shows what Oracle WebCenter Suite providesFoot 1 :
Let's examine these building blocks in more detail.
WebCenter Framework augments the Java Server Faces (JSF) environment by providing additional integration and runtime customization options. In essence, it integrates capabilities historically included in portal products directly into the "fabric" of the JSF environment. This eliminates artificial barriers for the user and provides the foundation for developing the kinds of context-rich applications depicted in Figure 1-1.
Portlets help you bring data from the Web, database, and so on, into your application. Using Oracle JDeveloper, you can create your own standards-based portlets to be consumed by any JSR 168 or WSRP-compatible portal. The Oracle Application Server Portal Developer Kit (PDK) has been enhanced to support extended portlet capabilities as defined by WSRP 2.0 within the structure of the Java Portlet Standards APIs. From a WebCenter application, you can consume JSR 168, WSRP 1.0, WSRP 2.0 or Oracle PDK-Java portlets all within the same application, or even within the same page.
Several pre-built portlets are available for use through a preconfigured OC4J that is automatically available to you through JDeveloper. Two such portlets, OmniPortlet and Web Clipping, help empower users to gather their own data, while the Rich Text portlet enables users to publish their own announcements and bulletins. You can make these portlets available to users by dropping them on your page, or you can use them yourself to create the specific portlets your users will need.
OmniPortlet: A portlet that enables users to easily publish data from a variety of sources, using a variety of layouts. Users can base an OmniPortlet on almost any kind of data source, such as spreadsheets (character-separated values), XML, Web Services, and even application data from an existing Web page. Once the data has been obtained, they can format it using layouts such as bulleted lists, charts, HTML, and so on.
As a developer, you might want to use this tool to gather and format the data for your users--for example, to create an employee directory--then place it on your page for user consumption. Once you do so, the portlet becomes available through JDeveloper's Component Palette for others to use in their applications.
Web Clipping: An extremely easy-to-use wizard that requires no technical expertise whatsoever. Users simply locate the Web content they want to "clip", then use the wizard to grab it and display it within their application. If the Web content on the original site is updated, so is the user's associated Web Clipping.
Rich Text portlet: A tool that allows users to publish their own announcements and broadcasts. When you place a Rich Text portlet on a page, during run time, authorized users can access all the rich-text editing tools needed to insert, update, and format display text.
WebCenter Framework provides new JSF components that allow developers to make any of their applications customizable. These new components act as containers into which developers can drop another Faces view component or a portlet. With these capabilities in place, administrators can customize virtually any JSF page by minimizing/maximizing, hiding/showing, or moving any component on the page.
Suppose you have data in a content management system such as Oracle Content DB, OracleAS Portal—or even on your file system—that you want to make available to your application. WebCenter Framework provides you with the JCR adapters you need to access that content. Using JDeveloper, you can then build JCR data controls to grab the content and drop it onto your page in a variety of display modes. WebCenter Framework also comes with Oracle Drive, through which you can represent the contents of your OracleAS Portal repository as a tree-like structure, right on your desktop.
With the ADF extensions provided in WebCenter Framework, you can define security for an entire application, a page within the application, or for individual actions provided by customizable components. In this tutorial, you will learn how to create a simple login page and assign basic privileges to several distinct users.
In many cases, it is desirable to leverage existing applications that have their own authentication mechanism, such as e-mail. WebCenter Framework provides the means to embed those applications through the use of the External Application wizard. See the Oracle WebCenter Framework Developer's Guide for more information.
WebCenter Framework reduces the time required to build, deploy, and migrate your applications through the use of several tools:
Development framework: Oracle JDeveloper and ADF provide the tools and framework you need to build and update your application. Adding portlets, content, and customization capabilities to your WebCenter application is simply a matter of dragging and dropping the appropriate objects in either a source or WYSIWYG environment. To simplify the test and debug phases, WebCenter Framework includes a deployment profile (WebCenter Application WAR) that packages and migrates your portlet customizations, content, and page customizations to any J2EE container (such as the standalone OC4J provided) so you can test and debug your application before deploying it to a production server.
Enterprise deployment: When you're ready to deploy your application to a production environment, Oracle WebCenter Framework's Predeployment Tool packages and migrates your portlet customizations to your production location, changes the pointer to your content repository, and ensures that the application points to your production Metadata Services location. When the Predeployment Tool completes its work, you get a target EAR file that you can then deploy to the final location using Enterprise Manager.
Standards-based administration: Browser-based tools allow administrators to deploy, configure, and manage WebCenter applications. In addition, tools built on industry standards-based JMX methods offer administrators granular control and monitoring mechanisms for health status, performance, and popularity. Tools for obtaining historical performance and status reporting over time (within a single Oracle Application Server context) are also provided. WebCenter application metrics are delivered using the familiar Application Server Control monitoring and management interface.
WebCenter Services offer a variety of content management, search, and communication services, including:
Oracle Content Database (Oracle Content DB), the default content repository for Oracle WebCenter Services. Oracle Content DB is a full-fledged content management system that enables users to manage content through the Web or from desktop applications. A rich library of ready-to-use Web services is provided to content-enable your enterprise in a service-oriented environment. With Oracle Content DB, you can:
Improve the productivity of individuals and teams with secure access to the right content in the context of business processes
Reduce risk associated with content, including information loss and legal discovery
Facilitate adaptability of business processes
Reduce IT and administrative costs through content consolidation
Oracle Content DB bridges the gap between limited capability file servers and the specialized, expensive, and complex content management applications that are so widely available.
Oracle Secure Enterprise Search is a crawler-based service that can search a multitude of sources, structured and unstructured, in a variety of file formats, indexed or real-time. With Oracle Secure Enterprise Search, you can reduce the time spent finding relevant documents on your company's information repositories.
Communication Services, which help you better connect people and facilitate communication. These services include:
Instant Messaging: Lets users freely exchange ideas through audio and video feeds, file exchange, and a range of other capabilities.
Presence Server: Presence provides information about a person's availability to every person or application that subscribes to that person's status. Chats and other real-time services can be initiated from the associated user interface.
Discussion forum: An interactive message board for sharing information, questions, and comments.
Wiki is server software that allows users to freely edit and create Web page content using a Web browser. This ease of interaction and operation makes Wiki an effective tool for collaborative communication.
Oracle JDeveloper is an integrated development environment (IDE) for building service oriented applications using the latest industry standards for Java, XML, Web services, and SQL. Oracle JDeveloper supports the complete software development life cycle, with integrated features for modeling, coding, debugging, testing, profiling, tuning, and deploying applications. Oracle JDeveloper's visual and declarative approach and the Oracle Application Development Framework(ADF) work together to simplify application development and to reduce mundane coding tasks. For example, code for many standard user interface widgets, such as buttons, list of values, and navigation bars, are pre-packaged for you. All you have to do is select the appropriate widget from the Component Palette and drop it into your application.
As you work through this tutorial, you will become more familiar with Oracle JDeveloper and the advantages it offers. For more information about Oracle JDeveloper, access one of the many educational aids from the Oracle JDeveloper Start Page (Figure 1-3), accessible from Oracle JDeveloper's Help menu.
In this tutorial, you will use JDeveloper to build an application containing five simple pages:
A Welcome page, which displays public content to public users and secure content to authenticated users.
A Login page, through which you will learn the basics of how to allow users to authenticate themselves.
MyPage, upon which you will place a Java portlet, the Rich Text portlet, and images from your file system.
MyContent, upon which you will publish content from your file system.
MyWeather, through which you will learn how to use OmniPortlet and the Parameter Form Portlet, and how to enable communication between the two.
The logical flow between the pages is illustrated in the following graphic (Figure 1-4):
Note that you will not develop these pages in the order they are presented in the graphic. Rather, you will start with a very basic page, MyPage, then move gradually from there into more complex topics.
This tutorial is designed for the chapters to be completed in the same sequence as they are presented. Due to dependencies, completing them in a different order may result in missing resources or even errors. The path through this tutorial is as follows:
Chapter 2, "Getting Started" tells you what you need to do before you can complete the steps in this tutorial. Be sure to complete all the steps described in this chapter.
Chapter 3, "Building and Testing Your First Portlet" shows you how to build a basic page, MyPage, add a simple portlet, then enhance the portlet to embrace more sophisticated logic.
Chapter 4, "Customizing Your Page" introduces you to the means by which you enable customization for your application. In this lesson, you'll continue to work with MyPage.
Chapter 5, "Adding the Rich Text Portlet" shows you how to place the Rich Text portlet on MyPage.
In Chapter 6, "Making Portlets Communicate", you'll create a new page, MyWeather, and add a Parameter Form Portlet and OmniPortlet to it. You'll also learn how to set up parameters between the two portlets to enable simple communication.
Chapter 7, "Adding Content to Your Page" shows you how to add content from your file system onto a page called MyContent. You'll also learn how to add a search form to the page.
In Chapter 8, "Providing Security", you'll learn how to implement security by creating a Welcome page and a Login page. Only privileged users will have access to MyPage, MyWeather, MyContent, and secure content on the Welcome page.
Chapter 9, "Deploying Your WebCenter Application" will show you the steps involved in deploying your sample application.
If you've never used JDeveloper before, by the end of this tutorial you should have a fairly solid grasp of the fundamental purpose and capability of the tool. Of course, JDeveloper, as well as the framework it rests upon, ADF, both offer tremendous powers that are only briefly explored in this tutorial. You will no doubt want to learn more about both products before you begin developing in earnest. Here are two excellent resources, both available on Oracle Technology Network, http://www.oracle.com/technology/
:
Application Development Framework Tutorial
Application Development Framework Developer's Guide
Let's get started!
Footnote Legend
Footnote 1: Some components shown are not available in the initial release of Oracle WebCenter Suite: Presence/IM, Discussions, and Wiki. In this chapter, we describe components relevant to this release of Oracle WebCenter Framework.