Sunday Nov 25, 2007

DWR Reverse AJAX with GlassFish

DWR Logo

Last year we had described how to use DWR (Direct Web Remoting) with GlassFish (check the relevant entries); now JFA shows how to do Reverse AJAX using DWR and GlassFish, via Grizzly.

It is as simple as:

Download GlassFish and install it. See instruction here. Download dwr.war % cd ${glassfish.home}/bin % ./asadmin set % Start (or restart) GlassFish % ./asadmin deploy /path/to/dwr.war

Details at JFA's entry. Added: Also check the corresponding entry at Comet Daily.

Tuesday Oct 10, 2006

Hands-On Java EE and AJAX

A crowd of people

SDN is doing a series of articles on Hands-On Java EE and they are starting with AJAX. Mark and Rick are planning 4 articles in increasing complexity and so far have published two: the first one deals with Do-it-yourself, where the developer uses JavaScript and DHTML directly, while the second shows how to Use a Toolkit focusing specially on using the Dojo Toolkit, which is what Sun has standarized around.

In a related, longer, article, Mark and Ed provide a fairly complete review of the AJAX Design Strategies covering the two shown in the previous articles (do-it-yourself and client-side toolkit) as well as four others: a server framework like JSF or others, jMaki wrappers, Remote Invocation like DWR, and a pure-java like GWT.

Tuesday Jul 25, 2006


Sameer contrasts his previous post (Accessing JAX-WS Endpoint from Applets) with a new post demonstrating how to access the same web service using a browser-based client with some help from  DWR (Direct Web Remoting).

Some more DWR related articles can be found here.

Monday Jul 17, 2006

FREE 10 Week AJAX Programming Course

Sang Shin will be running a FREE 10 week Online AJAX with Java Programming Course starting on August 4th. The course covers the basics and introduces some of the popular AJAX tools, technologies and frameworks including JSON, DWR, Dojo, jMaki, Wicket, GWT and JavaServer Faces - many of which are part of or work with GlassFish There's also a whole Class dedicated to writing good JavaScript.

Tuesday Jun 27, 2006

Looking for a Comet and Finding... a Grizzly?

Photo of the Deep Impact Probe Impact
Photo of the Deep Impact Probe Launch

AJAX manipulates the local representation of a Web page using JavaScript and updates it with content (usually XML or JSON) that is fetched dynamically using HTTP. AJAX is becoming very popular because it avoids page refreshes and provides a more dynamic interface but one of its challenges is how to avoid stale data; there are a number of techniques to address this, including polling, piggybacking and long-lived HTTP connections.

These approaches have been around for a while in one way or another but, like AJAX, are becoming more popular and are being given different names. For example, the collection of technologies is called Reverse AJAX in DWR 2.0 (blog, Intro@Prokata). And the usef of long-lived HTTP connections, also called HTTP Streaming is also called Comet.

Comet is particularly interesting in that it has an impact in the programming model and in the implementation. There is beginning to be enough experience with the model (AsyncWeb, LightStreamer, Jetty's@TSS) to start thinking of standarization and GregW and others have advocated along this direction.

One of the interesting developments is that the Grizzly's machinery provides a very good foundation for Comet -- see for example the report from AgileAjax, and Jean-Francois and others are talking about using it more widely in that direction. I hope this will make it into one of our future releases of GlassFish.

PS. The name Comet is a takeoff on AJAX. This is possibly more of a US-centered joke, so check... AJAX's site (a brand of Colgate-Palmolive) and Comet's site (a brand of Prestige Brands, Inc).

Thursday Jun 22, 2006

AJAX downstream

Surfing Duke

I have found a few articles that talk about some "side affects" of the current AJAX hype. One talks about AJAX in your Content Management System and how CMS uses AJAX to help you develop your web app more easily now and how the CMS may support adding AJAX components in your web app. With the release of DWR 2.0 came the term reverse AJAX which addresses the fact that the server may want to communicate with the browser but the browser isn't used to listening (hmm, sounds like my kids). Finally Paul discusses web 2.0, storage and infrastructure that might be needed to get to all that data.

Tuesday Apr 11, 2006

DWR - Easy AJAX for Java, on GlassFish

DWR Logo

DWR (Direct Web Remoting) is a Servlet that can be used to provide AJAX support by generating JavaScript code from Java classes (web site, overview, Java.Net project). Check the examples and here is a Quicktime Movie of a site using DWR.

Masoud just tested that DWR works with the latest GlassFish build. As an extra bonus, Masoud also describes different ways of deploying into GlassFish.