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
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
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
Figure 4. Web 2.0 features dialog window
Figure 5. Modify Portlet Project Configuration dialog window
Dojo toolkit-enabled portlets
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
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
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
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
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
Figure 11. Insert Dojo Event Subscriber wizard
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
Figure 13. Create a new iWidget project
Figure 14. New iWidget project details dialog window
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
A web browser will open (Figure 16), displaying the tools.
Figure 16. Site Designing Portlet view
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
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
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
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
Remote Procedure Call capability
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
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
You can further configure the properties for the service method that you select.
Figure 23. Configure 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
Figure 25. JPA manger bean wizard
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
Be sure to check the Resources section below for where to find more useful information related to this article.
- Find out more about Rational Application Developer:
- Browse the Rational Application Developer for WebSphere Software page on developerWorks for links to technical articles and many related resources.
- Explore the Version 8 information center, which includes the documentation.
- Check out the WebSphere Portal Server and other IBM WebSphere Portal offerings.
- Visit the Rational software area on developerWorks for technical resources and best practices for Rational Software Delivery Platform products.
- Stay current with developerWorks technical events and webcasts focused on a variety of IBM products and IT industry topics.
- Attend a free developerWorks Live! briefing to get up-to-speed quickly on IBM products and tools, as well as IT industry trends.
- Follow developerWorks on Twitter.
- Watch developerWorks on-demand demos, ranging from product installation and setup demos for beginners to advanced functionality for experienced developers.
- Try one of our web-based training courses, which you can take anywhere, any time.
Get products and technologies
- Try Rational Application Developer for WebSphere Software, free.
- Evaluate IBM software in the way that suits you best: Download it for a trial, try it online, use it in a cloud environment, or spend a few hours in the SOA Sandbox learning how to implement service-oriented architecture efficiently.
- Join the Development Tools forum to ask questions and participate in discussions.
- Get involved in the My developerWorks community. Connect with other developerWorks users while exploring the developer-driven blogs, forums, groups such as the Rational Café and the Rational Application Developer for WebSphere wiki.
Dig deeper into Rational software on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Keep up with the best and latest technical info to help you tackle your development challenges.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.