Skip to main content


developerWorks  >  Java technology | Information Management | Sample IT projects | Open source | WebSphere  >

Kick-start your Java apps, Part 2

Easy, lightweight Ajax development with no-charge software

developerWorks

Level: Intermediate

Sing Li (westmakaha@yahoo.com), Author, Wrox Press

18 Apr 2006
Updated 05 Dec 2007

Register now or sign in using your IBM ID and password.

The combination of Eclipse, DB2® Express-C 9.5, and WebSphere® Application Server Community Edition 2.0 — all free to download, use, and deploy — is an excellent from-prototype-to-production suite for all of your Java™ and Java enterprise development needs. What might not be obvious is the relative ease with which you can use these proven tools to create, test, and deploy cutting-edge, lightweight applications as well. This tutorial guides you through the development of a small human-resources application, first using conventional JavaServer Pages (JSP) based technology, and then migrating it to a highly interactive solution using Ajax.

In this tutorial

This tutorial shows you how to move an application from a conventional design to one based on Ajax (Asynchronous JavaScript and XML) technology -- all within the friendly and familiar environment of the Kick-start your Java apps suite.

You'll start this tutorial by creating an employee-information panel using standard JSP and servlet technology. You'll do all development and testing using the Kick-start your Java apps suite. You'll design the application in Eclipse and then deploy and test it on Application Server. The application interactively fetches and displays employee information, including a photo, from a DB2 Express-C 9.5 database.

Then the tutorial discusses some of the limitations of the JSP application design and shows how a lightweight Ajax-based solution can help to overcome them. It introduces basic Ajax concepts and a popular Java toolkit called Direct Web Remoting (DWR). You'll convert the application to a lightweight design. The redesigned application resides within an HTML page hosted on Application Server acting as a simple Web server, accessing DB2 Express C database information directly using Ajax and JavaScript Object Notation (JSON) serialization.

The tutorial guides you through:

  • Developing an employee-information panel using conventional JSP and servlet technologies

  • Handling the display of GIF photos from DB2 binary large object (BLOB) fields using a custom servlet

  • Being introduced to Ajax and Direct Web Remoting

  • Migrating the employee-information panel to a lightweight Ajax design

  • Coding the Java-side support code for the new application

  • JavaScript coding using the DWR utilities library

  • Testing the new interactive employee-information panel

By the end of the tutorial, you'll appreciate some of the fundamental differences between conventional J2EE application design and the highly interactive Ajax-based approach. You'll also become comfortable with using the Kick-start your Java apps suite to explore present and future Java-based development frameworks.


Prerequisites

You should be familiar with Java development in general and server-side Java development specifically. This tutorial assumes you are familiar with basic Java EE deployment concepts, such as deployment descriptors and WAR archives. You should also be familiar with JSP programming and using tag libraries, such as the JavaServer Pages Standard Tag Library (JSTL). This tutorial assumes that you understand the general operations of a relational database and have programmed JDBC applications. It also assumes that you have completed the Kick-start your Java apps: Free software, fast development tutorial.


System requirements



Duration

2 hours


Formats

html, pdf


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!


Back to top


Document options

Document options requiring JavaScript are not displayed