Skip Headers
Oracle® Fusion Middleware Client-Side Developer's Guide for Oracle WebLogic Portal
10g Release 3 (10.3.4)

Part Number E14229-02
Go to Documentation Home
Go to Table of Contents
Go to Feedback page
Contact Us

Go to previous page
Go to next page
View PDF

2 Client-Side Development Technologies

This chapter introduces technologies and techniques that enable you to create rich and interactive WebLogic Portal applications. Rich and interactive portal web applications use a variety of technologies such as Ajax, JavaScript, JSON, and patterns such as REST. These technologies and patterns allow developers to create increasingly responsive and highly interactive web applications.

This chapter includes these topics:

2.1 Brief History of Client-Side Technology and the Portal

Since version 9.2, WebLogic Portal has incorporated Ajax (Asynchronous JavaScript and XML) technology to enable the asynchronous rendering of individual portlets. In version 10.0, the asynchronous desktop feature was added, enabling portal administrators to enable asynchronous rendering for an entire desktop, simply by setting a property on the portal desktop.

Table 2-1 summarizes the history of asynchronous capability in WebLogic Portal.

Table 2-1 History of Asynchronous Portals

WebLogic Portal Version Support for Asynchrony


Individual portlets can be rendered asynchronously by setting a portlet property. You can select either IFrames or Ajax as the integration technology. For details, see "Asynchronous Portlet Content Rendering" in Oracle Fusion Middleware Portlet Development Guide for Oracle WebLogic Portal.


In addition to the 9.2 features, entire portal desktops could be rendered asynchronously by setting the Asynchronous Mode of a desktop to "enabled." Desktop asynchrony uses Ajax technology. For details, see "Asynchronous Desktop Rendering" in Oracle Fusion Middleware Portal Development Guide for Oracle WebLogic Portal.

10.2 and later versions

Users can write their own asynchronous browser code using Ajax, JavaScript, the WLP Disc framework, and related technologies, as explained in this guide.

2.2 JavaScript

JavaScript is used to enable client-side interactivity. JavaScript is a compact, loosely typed language that is commonly used by web developers. JavaScript has become widely adopted in recent years largely because new frameworks and best practices have proliferated. The emergence of JavaScript toolkits, such as Dojo, make client-side development easier while hiding many of the problems surrounding cross-browser compatibility.

2.3 Ajax

Ajax refers to a collection of standards-based and open source browser technologies. While a classic web application refreshes the entire web page with each response from the server, an Ajax-enabled web application allows small amounts of data and UI markup to be returned from the server and rendered in the browser without refreshing the entire page. To the user, an Ajax-enabled web application responds more smoothly and quickly than a traditional web application.

At the heart of Ajax is the XMLHttpRequest object. Often referred to as XHR, XMLHttpRequest is an HTTP request object that makes asynchronous (typically), incremental requests to the server. The JavaScript API for XMLHttpRequest is a key component of Ajax-style web applications. This object allows the browser to respond to user events without reloading the entire page. For instance, a web application that allows users to explore folders in a content repository can be designed so that only the explorer part of the interface refreshes each time the user opens a folder.

As explained in Section 2.5, "Portal-Aware XMLHttpRequest", the standard XMLHttpRequest object is not always the best solution in a portal environment.

2.4 Disc JavaScript Framework

Disc is a WLP-specific, public JavaScript API for portlet development and interaction with the WLP rendering framework. Disc helps you write Ajax-enabled portlets and enable richly interactive web application features for your portal. See Chapter 3, "The WLP Disc Framework"

2.5 Portal-Aware XMLHttpRequest

When standard XHR objects are used in a portal environment, certain rendering, interportlet communication, and other problems can occur. XHR calls are scoped to an entire portal, while portal-aware XHR calls are scoped to individual portlets. A portal-aware XHR call retrieves some portion of a portlet's content and of any other portlets that are affected.

The Disc API class,, is an extension of the standard XMLHttpRequest class. WLP's XMLHttpRequest allows you to make asynchronous, incremental calls to the portal server, and supports portal features such as interportlet communication and WSRP. For more information, see Chapter 3, "The WLP Disc Framework"

2.6 Web-Based and REST Style Services

Representational State Transfer, or REST, is an architectural style for interacting with resources at a given URL. A REST architecture is typically used to provide a simple HTTP interface to resources published on the web. Although a simplistic analogy, you can think of REST services as an easy-to-use equivalent to traditional web services.

The primary advantage of using REST style services with web applications, such as WebLogic Portal, is that REST allows the web application to access web-addressed data and UI directly from the browser interface. The REST model provides a loose coupling between the data and the UI. REST services are easy to invoke using an HTTP request from a browser.

WebLogic Portal provides a REST framework that exposes WLP data and methods as REST services. These services unlock data from a portal web application and allow the data to be shared between applications. See Chapter 7, "The WebLogic Portal REST API" for details.


For a good general introduction to REST, refer to the Wikipedia article Representational State Transfer at

2.7 JSON

JavaScript Object Notation (JSON) is a data exchange format based on JavaScript. JSON is commonly used to pass objects between web clients and servers over HTTP. JSON objects are easy to read and to manipulate using JavaScript. For details on JSON, refer to

2.8 Ajax Toolkits

You can use available JavaScript toolkits and frameworks with Disc. For example, Dojo is a toolkit for DHTML and JavaScript browser programming. Dojo provides low-level IO (XMLHttpRequest), an event framework, JavaScript extensions, and a rich set of interface widgets such as buttons, lists, forms, and trees. Dojo works well for use in WLP portlets.

Dojo is discussed in Chapter 4 The Dojo web site provides additional documentation: