Skip to main content

Instructor-led training

AJAX for Java Developers Using Rational Application Developer (RAD) Training in College Park, Georgia

This four-day course includes detailed coverage of how to handle Ajax requests using Servlets/JSP and Java Web applications.

What you'll learn

This four-day 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.

Private Training for Teams

This course is offered as private, instructor-led training for organizations, onsite in College Park, Georgia or live online. Dates, delivery format, and course content are arranged around your team's requirements.

This course is not currently scheduled as a public class for individual enrollment.

Request Group Training

Prerequisites

Basic knowledge of HTML and JavaScript and practical Java and Servlet/JSP programming experience.

Course Outline

Session 1: Overview of Ajax
What are Rich Internet Applications?
What is Ajax?
Ajax, JavaScript, and DHTML
How Ajax Works
Overview of Ajax Technologies
 
Session 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
 
Session 3: XMLHttpRequest
The XMLHttpRequest Object
Using XMLHttpRequest
Working with Browser Differences
Your First Ajax Application
Using Ajax Data to Modify the Page
 
Session 4: Using Servlets and JSP with Ajax
Servlet/JSP Overview
Handling Ajax Requests
Returning Data to Ajax Requests
Using JSP pages to generate Ajax data
 
Session 5: More JavaScript for Ajax
Browser Events
Using Ajax with Browser Events
Using Built-in Objects
Objects and Arrays in JavaScript
Objects as Function Arguments
Defining Classes in JavaScript
Defining Modules and Namespaces in JavaScript
 
Session 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
YUI (Yahoo User Interface Toolkit) Overview
Google Maps and Google Ajax Search API Overview
 
Session 7: Cascading Style Sheets (CSS)
CSS Overview
Defining and Using Styles and Style Sheets
Using CSS to Customize Ajax Data Display
 
Session 8: JavaScript Object Notation (JSON)
JSON Overview
JSON Data Structure
Objects and Arrays in JSON
Creating/Working with JSON on the Server using Java
Working with JSON in the browser
Other JSON Tools Overview
 
Session 9: XML and Ajax
XML Overview
XML - The x in Ajax
Working with XML on the browser
Generating XML data on the server with Java
Using HTML vs Using XML vs Using JSON
 
Session 10: Direct Web Remoting (DWR
Overview - Invoking Java via Ajax
DWR Architecture
Invoking Java Functions From the Browser
Registering Callbacks
Additional Capabilities
Overview of other technologies (JSON-RPC, Google Web Toolkit - GWT)
 
Session 11: Ajax and JavaServer Faces (JSF)
JSF Overview
JSF and Ajax
Demo Lab: Using Ajax with JSF
Session 12: Patterns and Best Practices
JavaScript Best Practices
State of Ajax
Ajax Design Patterns
Ajax Security Issues
Other Ajax Issues
Recap of Ajax Technologies and Their Uses
Future Directions

What makes Ajax hard to master for Java developers

Ajax is not one technology. A single feature crosses the browser's JavaScript and DOM, an asynchronous HTTP exchange, a server-side Java handler, and a data format in between. Java developers usually know the server half well. The browser half is where most bugs appear.

The syllabus builds from the browser outward:

  • Browser foundations (sessions 2, 3 and 5). JavaScript functions, debugging, and updating the page with innerHTML. Then XMLHttpRequest, including browser differences. Then events, objects and arrays, defining classes, and modules and namespaces.
  • Server side (session 4). Servlets and JSP handling Ajax requests, returning data, and using JSP pages to generate Ajax data.
  • Data formats (sessions 8 and 9). JSON and XML, generated on the server with Java and consumed in the browser, with a direct comparison of HTML, XML and JSON as response formats.
  • Frameworks (sessions 6, 10 and 11). Prototype, script.aculo.us, Dojo, YUI, DWR, GWT and JSF.

Common misconceptions to expect:

  • Ajax always means XML. The syllabus treats JSON and plain HTML fragments as equal options.
  • A framework removes the need to understand XMLHttpRequest. Asynchronous callbacks and browser differences still surface when something breaks.
  • Ajax security is the same as ordinary form security. Session 12 covers Ajax-specific security issues and design patterns.

Who this course suits and where it fits

The course is a general-level class for developers who already have practical Java and Servlet/JSP experience and basic HTML and JavaScript knowledge. It suits teams that maintain or extend Java web applications and need to add asynchronous behavior. It also suits teams that must work out how Ajax requests are handled on the server.

If the JavaScript is the weak spot, sessions 2 and 5 cover it. Servlet/JSP fluency is assumed, because session 4 builds on it rather than teaching it from scratch.

For other options, see the Ajax courses and learning guide. It is the place to compare this Java-oriented course with the ASP.NET-based Ajax offerings. Organizations whose stack differs from the toolkits in the syllabus can ask for a tailored private class through a training proposal.

Illustrative scenarios

The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.

  • Search suggestions in an existing Servlet/JSP application. A team might add autocompletion to a search box. It could use script.aculo.us's Ajax autocompleter against a servlet that returns the matching entries, drawing on sessions 4 and 6.
  • Replacing page reloads with JSON. A team might have a table that reloads the whole page on each filter change. It could have a servlet return JSON built in Java, parse that JSON in the browser, and update only the table. It could then style the result with CSS, as covered in sessions 7 and 8.
  • Calling existing Java services from the browser. A team with business logic already in Java classes might use DWR to invoke those methods from JavaScript with registered callbacks (session 10). It could weigh that against hand-written servlets that return HTML, XML or JSON (session 9).

AI coding assistants for Ajax work

AI coding assistants are useful for boilerplate here. Examples are an XMLHttpRequest wrapper, a servlet that writes a JSON response, or a first draft of an event handler that updates the DOM. They can also explain unfamiliar JavaScript and suggest tests.

They fail in predictable ways on these topics:

  • Library and API style. Suggestions may mix incompatible approaches, such as Prototype's Ajax.Request, DWR callbacks and hand-rolled requests, in one page. They may also assume a different library version than the one your project uses.
  • Hand-built JSON or XML. Generated Java often concatenates strings without escaping, which breaks on quotes and special characters.
  • Security. Output may insert server data through innerHTML without sanitizing it, which creates script-injection risk. This is the kind of issue session 12 addresses.
  • Browser differences and timing. Generated code often ignores callback ordering, error states and the differences session 3 covers.

To verify, inspect the actual request and response in the browser's developer tools and check status codes, content type and character encoding. Test with data containing quotes, angle brackets and non-ASCII text. Run the page in each browser your users have. Review any generated code against what you learned in the JavaScript, JSON and security sessions.

Frequently asked questions

What level is this course and what do I need beforehand?

It is a general-level, four-day course. You need basic HTML and JavaScript knowledge and practical Java and Servlet/JSP programming experience.

What does the course cover?

The syllabus covers JavaScript for browsers, XMLHttpRequest, Servlets and JSP handling Ajax requests, CSS, JSON and XML generated and consumed with Java, and client-side frameworks (Prototype, script.aculo.us, Dojo, YUI). It also covers DWR, an overview of GWT, JSF with Ajax, and patterns, best practices and security.

Can the class be delivered privately for our team?

Yes. HSG provides private training for organizations, delivered onsite at your location or live online.

Can the content be customized?

Private course content can be customized, including to the technology versions your organization uses. You can describe your needs in a training proposal request.

Training locations

AJAX for Java Developers Using Rational Application Developer (RAD) training across the U.S. and beyond.

We provide private AJAX for Java Developers Using Rational Application Developer (RAD) training for organizations, onsite at your location or live online, throughout the United States and internationally.

View all AJAX for Java Developers Using Rational Application Developer (RAD) training locations

Train your team with HSG

Private, instructor-led training customized for your organization.

  • Onsite or live online delivery
  • Customized curriculum
  • For a single employee or an entire team
  • Flexible scheduling
  • Experienced instructors
Request Group Training

Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com

Ready to train your team?

Let's customize this training for your organization.

Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.