In this section, you get an introduction to Apache Pivot and application development on the Pivot platform before you look at the sample application you'll be creating in this tutorial.
The Web is now the defacto standard method for application delivery. However, functional requirements for Web applications have begun to scale beyond the capabilities of the browser. Even with the addition of scripting support, dynamic element manipulation, and asynchronous server communication, it is difficult to create a user experience in HTML that is truly on par with that of a desktop application.
RIA development platforms are a means to bridge the gap between the Web and desktop experiences. Using browser plugins, these platforms allow developers to build applications that look and feel more like native desktop applications but are deployable through the Web, like traditional, HTML-based Web applications. RIAs also often incorporate visual effects intended to enhance the overall user experience, such as animations and other dynamic behavior.
Common platforms for building RIAs today include Adobe® Flex®, Microsoft® Silverlight™, and Sun™ JavaFX™. Although, by many accounts, Java is still the most popular programming language, none of these platforms allow developers to write RIAs in Java. Flex applications are written in ActionScript, Silverlight applications are built using .NET, and JavaFX applications are built with JavaFX Script. Pivot allows developers to build RIAs that target the Java platform, using technologies and APIs that they already know.
Pivot also offers a truly open alternative for RIA developers. While they can be open source to varying degrees, Flex, Silverlight, and JavaFX are still proprietary platforms. Pivot began as an R&D effort at VMware in 2007 and was released as an open-source project in June 2008 under the Apache 2.0 license. Pivot joined the Apache Incubator in January 2009, and is currently driven entirely by the software.
Pivot provides a comprehensive set of foundation classes that together comprise a framework. Pivot classes are grouped into the following primary categories, which are packaged and distributed in a corresponding set of libraries:
Core- A set of common, non-UI classes
WTK- Classes for user interface development, including windows, dialogs, buttons, lists, text input, layout, drag and drop, XML markup, and more
Web- Classes to facilitate communicate with remote data services
Charts- Classes for adding interactive charting capabilities to Pivot applications
Tools- Development tools and utility applications
The application described in this tutorial highlights features provided by the Core, WTK, and Web libraries.
Figure 1 is a screen capture of the sample application, taken after executing a search for titles by the band Cheap Trick.
Figure 1. iTunes Search demo application
For a link to a live example of the demo application, see Resources (Java 6 SDK required). You click on a row in the table to display a thumbnail image of the search result, and click Preview to play a 30-second preview of the item.