Skip to main content

skip to main content

developerWorks  >  XML | Open source | Web development  >

Using Apache Pivot to build an iTunes search client

Build a rich internet application with WTKX and Java technology

developerWorks
Page 1 of 9 Go to the next page

Document options
PDF format - Fits A4 and Letter

PDF - Fits A4 and Letter
134 KB (20 pages)

Get Adobe® Reader®


My developerWorks needs you!

Connect to your technical community


Rate this tutorial

Help us improve this content


Level: Intermediate

Greg Brown (gkbrown@mac.com), Senior Software Engineer, VMWare

13 Oct 2009

Apache Pivot is an open source platform for building rich internet applications (RIAs) in a Java™ environment. It combines the enhanced productivity and usability features of a modern RIA toolkit with the robustness of the industry-standard Java platform. Apache Pivot applications take advantage of WTKX, an XML-based language for user interface design, which makes the application's output easy to visualize. In this tutorial, you will follow the implementation of a simple but practical Pivot application that allows a user to execute searches against the contents of the iTunes Store.

Before you start

This tutorial assumes some familiarity with common Web development concepts and technologies, including Java technology, XML, JSON, JavaScript, and HTTP. By the end of the tutorial, the reader will understand how these skills can be readily applied to building Pivot applications.

About this tutorial

Frequently used terms
  • Ajax: Asynchronous JavaScript + XML
  • API: Application programming interface
  • CSV: Comma separated value
  • GUI: Graphical User Interface
  • HTML: HyperText Markup Language
  • HTTP: Hypertext Transfer Protocol
  • JSON: JavaScript Object Notation
  • JVM: Java Virtual Machine
  • REST: Representational State Transfer
  • UI: User Interface
  • URL: Uniform Resource Locator
  • W3C: World Wide Web Consortium
  • XHTML: Extensible HyperText Markup Language
  • XML: Extensible Markup Language

Like other RIA development platforms, Apache Pivot includes a number of features that make building modern GUI applications much easier, including a declarative user interface, data binding, visual effects and transitions, and Web services integration. Pivot applications are built using a combination of Java technology and an XML-based markup language called WTKX. Java Virtual Machine scripting languages are also supported. You can run applications either in a Web browser using the Java plugin or as standalone (optionally offline) desktop applications.

In this tutorial, you will implement a simple but practical Pivot application that allows a user to execute searches against the contents of the iTunes Store. I begin with an introduction to the Pivot platform, followed by an overview of the iTunes search API, and then go on to present the demo application. Along the way I cover how to:

  • Create the user interface declaration in WTKX, Pivot's XML-based UI markup language
  • Process JSON data using Pivot's built-in support for JSON serialization
  • Handle user interface events in JavaScript


Back to top


Prerequisites

The example code in this tutorial is based upon Pivot 1.3 release, which requires the Java 6 (or higher) SDK. You can download Pivot 1.3 as binaries or source; the source distribution contains a BUILD file that describes how to build the project.

Source code for the demo application is distributed with the platform. All code samples are released under the Apache Software License, Version 2.0.

See Resources for links to download the example code, Pivot 1.3, the Java 6 SDK, and the demo application.



Back to top



Page 1 of 9 Go to the next page