Interview: Joe Walker discusses DWR

| by Ryan Slobojan Follow 0 Followers on Oct 26, 2007. Estimated reading time: 2 minutes |

Direct Web Remoting (DWR) is a AJAX library which allows JavaScript in a browser to interact directly with Java code on a server. InfoQ spoke with Joe Walker at QCon London 2007 about the DWR toolkit. Walker discussed DWR 2.0 including new features such as details about reverse AJAX, the deal with TIBCO, DWR support in IDEs, the integration with Spring, future plans for DWR, and interesting applications of DWR from the very large to the very flashy.

Watch Joe Walker discusses DWR (14 minutes).

From the interview:

Basically what DWR does is, it's a way of taking Java classes and making them easily usable from JavaScript. You take a Java class, you say to DWR "we would like to export this" and DWR will create you some stubs so you can call it from JavaScript - it'll do all the marshalling and that sort of stuff. The idea is pretty much any Java method, you can call that from JavaScript, and it will marshal pretty much anything, so all sorts of collections of maps, strings, integers, even things like DOM models will come across onto the browser for you to use there.

On DWR 2.0's new 'reverse AJAX' feature:

The idea is that you will be able asynchronously on a server to push commands out to the browser. So it very simply enables you to say, "get me all of the browsers on this page" or "give me this particular browser", and then say "I would like all these browsers, or that browser, to do this thing - here is a command for them" -- that is the basic here, really. I guess the next step on from that is we have got a set of APIs in Java that mimic APIs in JavaScript -- the initial one at the moment is the effects API as well as the DWR DHTML manipulation library.

It enables you to do things like, the obvious example everyone uses is the chat application. When somebody types something in on a message box you can say, "get me all the other browsers looking at this page and add this message to the list." and there's a Java API to let you do that page manipulation and it will automatically convert all the primitives from Java types into JavaScript types and pass that out to all the browsers looking at that page. So all of the browsers will dynamically change with a single Java command, which is quite nice.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

great interview by Jorge Martin

Is there any way to download the video?

yes, but by Luis Garcia

What's it like being a Texas Ranger?

Great Interview. by PAVAN SIBAL

Very nice update on DWR front.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

3 Discuss

Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you