Aptana Jaxer + DWR Integration Released

Some weeks ago I announced that we were working with Aptana to make Jaxer work well with DWR. The good news is that today we're in a position to release the first part of the work.

We've changed the API slightly since I first announced it, but the general idea is the same:

Jaxer.dwr.configureAccess("com.example.jaxer.Simple");

var reply = Simple.sayHello('Jaxer');
dwr.util.setValue('replyDiv', reply);

The things to note:

  • No more callbacks. DWR now works synchronously when working with Jaxer. (This mode will be available in full DWR soon too, however we will continue to recommend against using synchronous mode on the Internet)
  • No dwr.xml/annotations. When integrated with Jaxer, DWR is being used as the glue between 2 servers on the intranet so the security rules are different, and that means we can simplify configuration.

jaxer page flow

The Aptana blog has more information, including some tutorials and more documentation.

I've documented the high-level view within the DWR documentation.

For now all objects accessed by Jaxer are 'script' scope, which means they live for the lifetime of a Jaxer page. We're hoping to extend this in the future so that all the scopes that DWR supports are available. We would also like to enable a import/constructor like syntax, so you can do things like this:

Jaxer.dwr.import("java.io.File");
var file = new File("settings.ini");
if (file.canRead()) {
  // etc.
}

Comments

Comments have been turned off on old posts