Easy Ajax for Java

Erik Kerkhoven
0 0
Read Time:1 Minute, 12 Second

I like to bring under your attention DWR – Easy Ajax for Java, a Java open source library created by Getahead. “Easy” is always good (like “free” is always good). The easiness of DWR is the principle that a Javascript method calls a server-side Java method: “It allows code in a web browser to use Java functions running on a web server as if it was in the browser.” An informative picture of this archtecture on the Getahead site is:

The DWR library consists of (1) Javascript and (2) a Java servlet (DWRServlet). This way implementing Ajax in a web page, feels like developing the client piece of a classic client/server application, like for example POOF (Plain Old Oracle Forms). In the figure above this simularity can be seen: when the event handler of a list item is launched, it calls a method on the server. In this example this is the getOptions method.
DWR can be integrated with JSF, Spring, Struts, Hibernate, Beehive.
So far this short notice. I took an example from the Getahead site and deployed this with maven on a local server. It is a bare minimal chatbox but that consists of just a few code lines(!) I added a weird clear button in just a minute. DWR is intriguing stuff to have a look at when you are interested in Ajax. Check out http://smnserver:8180/chat/ and http://smnserver:8181/svn/repos/chat/trunk.

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
Next Post

ODTUG 2006 Kaleidoscope (Washington) - We are on our way... - AMIS does 9 presentations!

We at AMIS have a fairly long tradition when it comes to having developers attend the annual ODTUG (Oracle Development Tools User Group) conference. My first conference – while I was still at Oracle – was in 1997, in San Diego. And I haven’t skipped a single one, presenting on […]
%d bloggers like this: