Course Catalog
Curriculum Guides
  .NET
  Java/J2EE
  XML
Downloads
Buy Courseware
Customization
News
Authors
Technical Library
FAQ
About Object Innovations
Opportunities
Contact Us
Home

 

 

   
www.objectinnovations.com
info@objectinnovations.com
877-558-7246 (toll free)  
781-466-8012  

245E.  Ajax for Java Developers

Rev. 1.0

 

Ajax (Asynchronous JavaScript and XML) is a browser based technology for creating highly interactive Web applications by updating parts of a Web page with new data without reloading the whole page.  This results in a more responsive and interactive interface, and is the technology powering websites like Google Maps and Google Mail.

 

There is no formal definition of Ajax, but using XMLHttpRequest/JavaScript has become the dominant Ajax technology.  The course starts with an introduction to using XMLHttpRequest and a somewhat brief introduction to JavaScript fundamentals.  It includes in-depth coverage of programming with Ajax to send/retrieve data to/from a server, updating a Web page with JavaScript, and using CSS to modify the look of a Web page.

 

The course includes detailed coverage of how to handle Ajax requests using Servlets/JSP and Java Web applications.  This includes generation of HTML, XML and JSON from Java, as well as the use of various other server-side Ajax techniques.

 

The course also provides extensive coverage on using frameworks - both client side JavaScript and server side Java - to support the complex programming that Ajax requires.  These frameworks can reduce the sometimes complex and tedious programming that Ajax can require. 

 

Client side frameworks can relieve you from dealing with the low level complexities of Ajax, or provide preexisting widgets like a textbox with Ajax-powered completions.  We also cover frameworks like Direct Web Remoting (DWR) to invoke server side Java from JavaScript, and Google Web Toolkit (GWT) to develop Ajax applications completely in Java, and have GWT generate the JavaScript.

 

This course is hands on with labs to reinforce all the important concepts.  It will enable you to build working Ajax applications, and give you an understanding of the important concepts and technology in a very short time.

 

This course is designed to run on a Tomcat-Eclipse-Ant platform. A variant of this course, 245, is available that runs on a generic Tomcat-Ant platform.

 

LEARNING OBJECTIVES

 

·         Understand the principles of interactive Web applications and how Ajax is used to create them

·         Understand how XMLHttpRequest works, and use it with JavaScript to update a Web page

·         Use JavaScript and DOM with Ajax to manipulate the structure of a Web page

·         Use Servlets/JSP to handle Ajax requests

·         Be familiar with Ajax technologies and frameworks such as Prototype, script.aculo.us, Dojo, JSON libraries, DWR (Direct Web Remoting) and GWT (Google Web Toolkit)

·         Understand the basics of CSS and use it with Ajax to dynamically change the Web page look

·         Understand and use JSON (JavaScript Object Notation)

·         Be familiar with using Ajax with XML

·         Use Ajax with HTML, JSON or XML on both the client-side and server-side (Java)

·         Use DWR (Direct Web Remoting) to invoke server side Java from the browser

·         Use Ajax with JSF

·         Understand issues with using Ajax technology, including design and security issues

 

Course Duration:  4 days

 

Prerequisites: 

·         Basic knowledge of HTML and JavaScript

·         Practical Java and Servlet/JSP programming for the Java material

 

Audience:

·         Web developers using Ajax (about 2/3 of the course does not require Java knowledge)

·         Java developers who need to work with Ajax based Web applications

 

1.      Overview of Ajax

What are Rich Internet Applications?

What is Ajax?

Ajax, JavaScript, and DHTML

How Ajax Works

Overview of Ajax Technologies

 

2.      Basics of JavaScript for Browsers

JavaScript and DHTML Overview

Using JavaScript in an HTML Page

Basic JavaScript Programming

Functions in JavaScript  

Debugging JavaScript

Accessing HTML Elements and Modifying with innerHTML

 

3.      XMLHttpRequest

The XMLHttpRequest Object

Using XMLHttpRequest

Working with Browser Differences

Your First Ajax Application

Using Ajax Data to Modify the Page

 

4.      Ajax Server Side Java Programming Basics

Servlet/JSP Overview

Handling Ajax Requests

Returning Data to Ajax Requests

Using JSP pages to generate Ajax data

 

5.      More JavaScript for Ajax

Browser Events

Using Ajax with Browser Events

Using Built-in Objects

Creating Objects in JavaScript

Objects as Function Arguments

Accessing Page Elements With DOM

 

6.      Client-Side Ajax Frameworks

Overview - Prototype, Dojo, script.aculo.us and others

Prototype Overview

Using Prototype ($(), Ajax.Request)

script.aculo.us Overview

Using script.aculo.us Ajax autocompleter

Servlet/JSP (server-side) Generation of Data

Dojo Toolkit Overview

Google Maps and Google Ajax Search API Overview

 

7.      Cascading Style Sheets (CSS)

CSS Overview

Using CSS to Customize Autocomplete Display

 

8.      JavaScript Object Notation (JSON)

Overview

JSON Data Structure

Objects and Arrays

Working with JSON in the browser

Using JSON on the Server with Java

Other JSON Tools Overview

 

9.      XML and Ajax

The x in Ajax

Why use XML, and why not

Working with XML on the browser

Generating XML on the server with Java

HTML vs XML vs JSON

 

10. Direct Web Remoting (DWR) - Invoking Java via Ajax

Overview

DWR Architecture

Invoking Java Functions From the Browser

Registering Callbacks

Additional Capabilities

Overview of other technologies (JSON-RPC, Google Web Toolkit - GWT)

 

11. Ajax and JavaServer Faces (JSF)

Overview

Ajax4sjf Overview

Using Ajax with Ajax4jsf

Ajax4jsf components

The RichFaces Component Library

 

12. Patterns and Best Practices

JavaScript Best Practices

State of Ajax

Ajax Design Patterns

Security Issues

Other Ajax Issues

Recap of Ajax Technologies and Their Uses

Future Directions

 

System Requirements

 

Hardware – minimal:                     1 GHz, 512 meg RAM, 1 gig free disk space

Hardware – recommended:           2 GHz, 1 gig RAM, 1 gig disk space

Operating system:                          Tested on Windows XP Professional.

Software:                                       All free downloadable tools.

 

See the appropriate course Setup Guide for details.