New Portal Toolkit features in IBM Rational Application Developer Version 8.0

13 additions to help you create and deploy portlets and portal applications

Learn how the new Portal Toolkit features in IBM Rational Application Developer Version 8.0 make it easier than ever to create and deploy portlets and portal-based software applications. The toolkit now aligns with IBM WebSphere Portal Version 7.0 and provides new features that improve performance and usability.

Share:

Manish Aneja (mananeja@in.ibm.com), Team Lead, Rational Application Developer Portal Toolkit, IBM Corporation

author photoManish Aneja is team lead for the IBM Rational Application Developer Portal Toolkit for the IBM India Software Labs, in Gurgaon. He has worked on automation for reliability and functional tests and holds a master’s degree in computer applications.



Mansi Gaba (mansigaba@in.ibm.com), System Software Engineer, Rational Application Developer Portal Toolkit, IBM Corporation

author photosMansi Gaba is a system software engineer for the IBM India Software Labs, in Gurgaon. She works with IBM Rational Application Developer Portal Toolkit team in the WebSphere Portal-Lotus Collaboration software group and focuses on JavaServer Faces portlet application development and tool support.



24 November 2010

Also available in Chinese

What’s new in Version 8

Software development teams use the IBM® Rational® Application Developer integrated development environment (IDE) to design, develop, test, and deploy software. It includes the Portal Toolkit, which you can use to create and deploy portlets and portal-based applications. In Version 8, it aligns with recent IBM® WebSphere® Portal runtime capabilities and provides new features that improve performance and usability.

This article provides an overview of the following new Portal Toolkit capabilities:

  • Flexible installation options for specific versions of portal servers in WebSphere Portal Version 7 for testing portlet projects at run time
  • Improved portlet creation wizard that is easier to use and does more for you
  • Dojo toolkit-enabled portlets for portal run times, with the option to create custom widgets that can be reused and enhanced further (for WebSphere Portal v6.1 and later)
  • Dojo toolkit-based client-side mechanism to track communication between portlets
  • iWidget tools for creating and publishing projects at runtimes (for WebSphere Portal Version 6.1.5 and later)
  • Site Designing Portlet, a web-based UI to create and manage portal sites
  • Remote server startup option for a WebSphere Portal Server installed at a remote location
  • JSR 168 feature support for JavaServer Faces 1.2 portlet projects
  • Dynamic updates to the Portlet Bridge while migrating projects to Rational Application Developer 8.0
  • RPC (Remote Procedure call) capability for a portlet project
  • JPA-enabled portlets for portal run times
  • Flexible access to documentation, either on the web or to download and use locally, which can save hard drive storage space

A glimpse of the new features

The following subsections provide more details on the enhancements and new features to the Portal Toolkit.

Flexible installation options

There is a major improvement in the installation options for the Rational Application Developer Portal Toolkit in the IBM® Installation Manager (see Figure 1). You can select the option to install the development tools for the specific portal server version under the Portlet and Portal Development Tools section. This can reduce the hard drive storage space by approximately 300 MB.

Figure 1. Installation options
Check box options

IBM WebSphere Portal v7.0 as runtime target

One of the major features of the Portal Toolkit component is the addition to the New Server wizard of a new server run time, a server type, and stubs for WebSphere Portal v7.0 support.

Figure 2. The New Server wizard
Server type selection view

Note:

Tool support for portal projects does not exist for IBM WebSphere Portal v7.0 run time.

In Rational Application Developer 8.0, you can create portlet and iWidget projects targeted to WebSphere Portal v7.0 at run time. You can target a local run time if you have a portal run time installed on your local machine. Otherwise, you can target server stubs to create the portlet project. To test the project, you can create the server instance of the desired run time and then publish the portlet project by using either the Run On Server or the Deploy option.

Improved portlet creation wizard

The Portlet Project creation wizard (Figure 3) is redesigned, and the customization has been moved to new wizards. The new wizard for enabling the Web 2.0 features for portlet projects (Figure 4) is easier to read and more user-friendly. By using the new wizard for portlet configuration (Figure 4), you can select the portlet type and the API. Behind the scene, it selects the desired project facets (for the features selected in the dialog window), makes it easy for developers who do not use Eclipse-based tools, and reduces the chances of human error.

Figure 3. Portlet Project wizard
Portlet settings area highlighted
Figure 4. Web 2.0 features dialog window
Modify portlet project Web 2.0 features check boxes
Figure 5. Modify Portlet Project Configuration dialog window
Fields for portlet API and type

Dojo toolkit-enabled portlets

The Dojo toolkit provides a strong object-oriented JavaScript framework, Ajax capabilities, and a rich set of reusable UI widgets. You can use these to create rich, interactive, and highly responsive web applications.

The Portal Toolkit in Version 8 provides enhanced support of the Dojo toolkit for portlet projects. It aids the programmers who are developing applications for WebSphere Portal run time with the help of a series of wizards, automated code generation, views, editors, drag-and-drop features, and so forth.

To take advantage of these capabilities, select the Dojo Toolkit option in the Web 2.0 Features dialog window (Figure 6) when you create a portlet project.

Figure 6. Portlet Project wizard
Project creation wizard plus Web 2.0 Features view

Larger view of Figure 6.

As Figure 7 shows, selection of the Dojo Toolkit option in the portlet creation wizard installs the Dojo toolkit facet on WebSphere Portal software.

Figure 7. "Dojo toolkit on WebSphere Portal" checked under Web 2.0
Project Facet screen showing check boxes

With the new Dojo facet enabled in a portlet project, you can add various Dojo components from the Palette view (Figure 8) by expanding the desired drawer that you want to use and dragging the required component. The code generated by the tool follows the recommended practices for using a Dojo toolkit-based portal application.

Figure 8. Palette tab lists Dojo toolkit-based widgets
Palette tab view

Dojo-based client-side tracking of inter-portlet communication

The Dojo toolkit provides a publish-subscribe mechanism that enables the creation of loosely coupled components in a client-centric application.

The portlets that use the Dojo toolkit can use this event mechanism to interact with each other. Before they can interact, the two portlets need to specify a common topic. To accomplish this, the subscriber portlet registers its event handler to this topic, and the publisher portlet (Figure 9) publishes a message to this topic.

Figure 9. Palette view
Palette with dojo event publisher and dojo event subscriber

You can drag these palette items (Dojo Event Publisher and Dojo Event Subscriber) to the portlet JavaServer Page (JSP) to create a Dojo event publisher and subscriber, as the following three screen captures show.

Figure 10. Insert Dojo Event Publisher wizard
Screen to specify settings for the event publisher
Figure 11. Insert Dojo Event Subscriber wizard
Screen to specify settings for the event subscriber

When the publisher portlet publishes a message to this topic when an event occurs, the Dojo event system passes this message to all of the subscriber portlets on the same portal page, meaning that all of the handler functions are executed, even if they belong to different portlets. The Portal Toolkit in IBM Rational Application Developer v8.0 enables you to create portlets that can communicate with each other or to have the portlet’s components communicate by using the Dojo publish-subscribe mechanism. The toolkit supports all of these actions:

  • Automatic generation of the infrastructure code
  • Automatic generation of the topics
  • Linking of the dojo.publish calls to the event of the relevant publisher component
  • Registering the handlers of the relevant subscriber portlets to these topics for communication to take place,
  • Automatic generation of subscriber handlers

iWidget tool for creating and publishing projects

An IBM® iWidget is a web application that is designed to work within the framework that is defined by the iWidget specification. An iWidget is a reusable component that can be deployed in web applications. (For more information, see the September 2010 IBM® developerWorks® article, Create and test IBM iWidgets using Rational Application Developer).

An iWidget can be created either in a static or a dynamic web project (see Figures 12, 13, and 14). It is a reusable component that can be embedded in any web application and can run in different browsers. You can also use it to build situational applications in a mashup environment.

Figure 12. Use the New Project wizard to select the iWidget Project option
New Project wizard: Select a wizard
Figure 13. Create a new iWidget project
New iWidget Project window
Figure 14. New iWidget project details dialog window
Dynamic Web Project view

You can use the Portal Toolkit to create iWidget projects and publish them on the portal server at run time with WebSphere Portal v6.1.5 or later.

Site Designing Portlet for creating and managing the portal site

The Site Designing Portlet is a web-based user interface to create and manage the portal site, including changing the appearance and layout.

You can manage site by adding pages or labels in the site navigation tree or adding portlets on page. This portlet also provides features to edit the page properties. For example, you can rename the pages, apply a theme, create an easy-to-remember URL, wire portlets inside of the pages, and edit the page’s metadata. This portlet’s main page uses the Portal theme by default. This feature is supported with IBM® WebSphere® Portal Server v6.1.5 and later.

To launch this feature, right-click the server instance, and select the Site Designing Portlet option (Figure 15).

Figure 15. Server instance context menu
Site Designing Portlet selected

A web browser will open (Figure 16), displaying the tools.

Figure 16. Site Designing Portlet view
Tab selected and open in a browser

Larger view of Figure 16.

Remote server startup option

You can use this option to start a remote WebSphere Portal Server from your workspace. (See the Resources section for where to learn more about this server and other WebSphere Portal offerings.) While creating a new server instance, you can enable this feature in the New Server creation wizard (Figure 17).

Figure 17. Remote server settings wizard page
Remote WebSphere Application Server Settings dialog window

Alternatively, a new section for starting a remote server is added in the server editor overview section shown in Figure 18.

Figure 18. Remote server settings
Remote Server Settings view in the server editor

You can start the remote server by using the Start option in server menu (Figure 19).

Figure 19. Start and Stop option for a remote server
Shows the Start option in the server context menu

JSR 168 feature support for JSF 1.2-based portlet projects

The IBM® JSF Portlet Bridge included in Version 8 supports Java Specification Request (JSR) 168 JavaServer Faces (JSF) portlet applications that are based on JSF 1.2. There is also improved support for resolution of portlet variables that use the JSF 1.2-based PortletVariableResolver.

Dynamic update of the Portlet Bridge during migration

When you migrate a JSF portlet project from Rational Application Developer Version 7.0.0 to Version 8.0, the JSF Portlet Bridge is automatically updated to the most recent version, too. If you are migrating projects from Version 7.5 to v8.0, a quick fix option will be provided to update the JSF Portlet Bridge, instead.

Figure 20. Quick fix for updating the Portlet Bridge from Version 7.5
Quick Fix window

Remote Procedure Call capability

Direct Web Remoting is a pattern that provides support for JavaScript or client-side code to directly invoke server-side logic. This pattern provides the ability to invoke Java methods from JavaScript. The invocation is by means of a JSON-RPC (JavaScript Object Notation-Remote Procedure Call).

The RPC adapter helps developers create command-based services quickly and easily in a manner that complements programming styles for Ajax applications and other lightweight clients. To enable this feature in a portlet project, you can select the RPC Adapter option in the project creation wizard. To use this feature, you must have the Web 2.0 feature pack (Figure 21) installed on your runtime server.

Figure 21. Specify Web 2.0 features
RPC adapter selected

The RPC adapter provides a mechanism for exposing server-side Java objects (such as Enterprise JavaBeans (EJB) session bean methods or POJO services) to Ajax-based user interfaces.

You can invoke the exposed RPC adapter services wizard through the context menu of the portlet project, and then select the method that is to be exposed for EJB or a POJO (plain old Java object) class. (See Figure 22.)

Figure 22. Expose the RPC adapter service wizard
Dialog window

You can further configure the properties for the service method that you select.

Figure 23. Configure the method
Configure the adapter properties for the method

JPA-enabled portlets for portal run times

The Java Persistence API (JPA) is a part of the Java 2 Platform, Enterprise Edition (J2EE) specification. You can create JPA-enabled portlets. The JPA simplifies object relational mapping and data persistence. While developing a JPA application, a developer deals directly with the JPA entities that are object representations of database tables (Figure 24). You can use the Portal Toolkit and JPA tools to build a JPA portlet application with few clicks in the wizard (Figure 25) and simple dragging actions without writing a lot of code.

Figure 24. JPA manager beans directory
Page Data view of a JPA-enabled portlet
Figure 25. JPA manger bean wizard
Wizard view shows the available JPA entities

Flexible access to documentation

During installation, you can choose to access help content from the web or to download it to use locally (Figure 26). Accessing the documentation from the web has the advantage of reducing local storage space requirements, plus the information will be updated regularly.

Figure 26. Documentation configuration dialog window
Help system configuration view

Be sure to check the Resources section below for where to find more useful information related to this article.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Rational software on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational, DevOps
ArticleID=591537
ArticleTitle=New Portal Toolkit features in IBM Rational Application Developer Version 8.0
publish-date=11242010