Ajax on Java
By Steven Douglas Olson
February 2007
Pages: 228
ISBN 10: 0-596-10187-2 |
ISBN 13: 9780596101879




(Average of 4 Customer Reviews)


Description
This practical guide shows you how to make your Java web applications more responsive and dynamic by incorporating new Ajaxian features: suggestion lists, drag-and-drop, and more. Java developers can choose between many different ways of incorporating Ajax, from building JavaScript into your applications "by hand" to using the new Google Web Toolkit (GWT). The book includes strategies for integrating Ajax into JSP and JSF applications, and using Ajax with Struts.
Full Description
This practical guide shows you how to make your Java web applications more responsive and dynamic by incorporating new Ajaxian features, including suggestion lists, drag-and-drop, and more. Java developers can choose between many different ways of incorporating Ajax, from building JavaScript into your applications "by hand" to using the new Google Web Toolkit (GWT).
Ajax on Java starts with an introduction to Ajax, showing you how to write some basic applications that use client-side JavaScript to request information from a Java servlet and display it without doing a full page reload. It also presents several strategies for communicating between the client and the server, including sending raw data, and using XML or JSON (JavaScript Object Notation) for sending more complex collections of data.
The book then branches out into different approaches for incorporating Ajax, which include:
- The Prototype and script.aculo.us Javascript libraries, the Dojo and Rico libraries, and DWR
- Integrating Ajax into Java ServerPages (JSP) applications
- Using Ajax with Struts
- Integrating Ajax into Java ServerFaces (JSF) applications
- Using Google's GWT, which offers a pure Java approach to developing web applications: your client-side components are written in Java, and compiled into HTML and JavaScript
Ajax gives web developers the ability to build applications that are more interactive, more dynamic, more exciting and enjoyable for your users. If you're a Java developer and haven't tried Ajax, but would like to get started, this book is essential. Your users will be grateful.
Featured customer reviews

You're wrong about the examples,
September 13 2008
Submitted by
David Leader
[
Respond |
View]
I'm afraid the remark about none of the examples working except a simple javascript in Chapter 2 is just untrue. I have the example from Chapter 3 - which involves a Java serlvet and Ajax - running on Tomcat on localhost on my Mac as I write. I was also able to set it up under Eclipse 3 EE (although Eclipse was and is a fight - if you make a mistake it seems to cache it, and refuse to take your update).
I haven't used the rest of the book, as that was all I needed - I've used Java Servlets before, and I had my own setups, which do not involve Ant. It may be difficult to set up the Servlets if you haven't done it before, but the examples I've tried do work.
I was mildly annoyed by the writer's completely ignoring the Mac as a Unix platform and pretending that IE, FF and Opera were the top three web browsers. Safari overtook Opera in 2004, and has never looked back. And as for Mac usage...
Awful, fradulent book,
August 01 2008
Submitted by
Jam One
[
Respond |
View]
This has to be one of the worse books on this topic, I cannot believe that any fair editorial process at O'Reilly would allow this book to be published. The less than stellar one paragraph about the author Steven Douglas Olsen should have been a clue. Apart from a simple javascript example in Chapter 2, none of the code presented as examples work, or even come close to working. As of this writing, I see no corrections for code, or even where to download the code used by the author in this book. This book is a complete waste of your money, time and efforts. The 5 stars given by the first 2 reviews I saw on this site, in which the reviewers declared this book as definitive, must have been done by members of the O'Reilly staff, or by people who know nothing about coding and certainly never attempted any of the examples. Shame on you O'Reilly for scamming the public out of $30 for this travesty. I would give it no stars but sadly that was not an option.
Great Introduction to Ajax!,
May 18 2007
Submitted by
Michael Davis
[
Respond |
View]
I like this book because of the code. I learn best by doing and my mantra is 'see one, do one, teach one.' This book has taken that approach of practical application. Granted, some of the code had to be massaged to work in my admittedly eccentric environment, but overall I was very pleased with the results. This book is not for the weekend warrior or novice. When you pick up this deceptively thin volume, get ready to work. As you work through all of the examples, you can really begin to get a feel for what Ajax can do for you in a Java environment. If you want no code and an easy read, go elsewhere! If you want lots of examples and plenty to keep you busy while you learn, forge on! Kudos to the author for his straightforward approach.
Read all reviews
Clear and Concise Presentation of Subject,
May 10 2007
Submitted by Anonymous Reader [
Respond |
View]
Thanks to the authors for such a way of condensing so much and presenting the topics with the clarity that this book offers. I am new to Ajax but neither new to Java nor Struts. The book provided me with all the basic concepts I needed to understand Ajax, and went beyond that. I have other books on Ajax, none of them so concise and powerful like this. Thanks again.
Save Your Money,
April 29 2007
Submitted by
John Baughn
[
Respond |
View]
Sad to say, this book is little more than a code dump, and the code does not run without debugging.
There are no explanations of technologies and concepts that surround Ajax, therefore, given the state of the code, there is not a lot of reason to work through the book. In fact, this is the first computer book that I returned to the seller, simply because I found so little reason to keep it on my bookshelf.
The writing in the introductory chapter gives promise, but as the book progresses the code quickly becomes dense and the organization and writing becomes unacceptably thin. I expected more from O'Reilly.
Before I gave up on this book, I was half way through it, and only one code set had ran correctly from build on. For example, the author's code has at least four variations of the basic application URL sprinkled among the Javascript and build files of the first four examples. Finding and correcting the URL was annoying but not difficult, but even after that, the examples did not run without further debugging.
I finally threw up my hands and surrendered... defeated by the author's rush to publication.
Media reviews
"This book is a great intro to AJAX. It starts by telling you where to find the few simple pieces you need (Browser, JDK, Tomcat, Ant), and gives a complete working example of a simple AJAX app. After reading the first 10 pages of the book, youll have an AJAX app up and running."
-- Dave Fecak,
Philadelphia Area Java Users' Group
"Consultant and practitioner Olson offers those new to Java the basics and moves up to advanced ideas at a brisk pace...Examples abound, as do illustrations. "
-- Shannon Hendrickson,
SciTech Book News
Read all reviews