Wizard API updated!
Tim Boudreau has released a new version of the Swing Wizard library (version 0.997) that fixes the WizardException bug reported in JavaWorld's recent Open Source Java Project profile. The article's examples have been reworked to test out the new, improved WizardException. Thanks, Tim, for this helpful fix!
Open Source Java Projects: The Wizard API

Newsletter sign-up

Sign up for our technology specific newsletters.

Enterprise Java
View all newsletters

Email Address:

Develop Java portlets

Use iViews to render data from a remote database

Maybe you believe the hype: corporate portals belong to the next wave of strategic enterprise applications that will transform the way companies do business. Or maybe you agree with a recent advertisement that proffered the following strategic analysis: portal schmortal. Either way, corporate portals are winning mind share in the boardroom with their promise of frontend, enterprisewide integration. For most corporate portals, this promise is fulfilled by custom-developed application components based on Sun Microsystems' Java 2 Platform, Enterprise Edition (J2EE) Web application model. These portal components—portlets—ultimately deliver business content to users' browsers.

Hands-on portlet development

To date, most vendors have constructed their own APIs and frameworks for portlet development. At the same time, Java Specification Request (JSR) 168 strives to produce a common specification that would enable portlet interoperability between corporate portal applications from different vendors. You can review the details of JSR 168 at the Java Community Process (JCP) Website (see Resources). The specification's public release is planned for April 2003. Until then, the best sources for Java developers to gain initial experience with portlet development are portal vendors' proprietary APIs.

German software vendor SAP offers an excellent place to start. The SAP offering includes a comprehensive development, deployment, and runtime environment—all of which fit on a modest-sized computer. All of the necessary software is free to download, either from open source projects or directly from SAP. In addition to its ready availability and no-cost startup, SAP has also produced a robust API and development framework for dynamic portlets, which SAP calls iViews.

iViews: Content in the SAP Enterprise Portal

The content in a portlet can include anything from a simple Webpage to a personalized view of complex data in multiple systems. Portals usually don't pretend to offer true backend integration without the support of a complete enterprise application integration (EAI) suite, but they instead enable an integrated view—an iView—of backend information for the user.

In this article's example, I will build a portal component iView that queries a remote database and renders the result within SAP's proprietary framework. Even though it is a simplified version of a customer-specific solution, the example is still relatively complex. While extremely basic HelloWorld and stock ticker examples might provide a simpler start, they ultimately fail to utilize the full range of functionality offered by vendors' APIs. The example iView pictured in Figure 1 displays a list of just-in-time (JIT) electronic data interchange (EDI) calls from the automotive industry.

Figure 1. Example iView of JIT EDI calls from MySQL

The download bundle (see Resources) that accompanies this article includes the source code for the JIT iView, as well as some additional resources to support the development process.

I used the open source MySQL database server to store the data for the example, but you can work with any Java Database Connectivity (JDBC)-compliant database and driver. The name of the database I created is edi_db, and it contains a single table, jit_calls. While this article does not describe the process to install and set up the example database, the download bundle includes a SQL flat file jit_calls.sql with dummy data, which you can import into MySQL.

1 | 2 | 3 | 4 | 5 | 6 |  Next >
Resources