• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

About the book

 
Ranch Hand
Posts: 409
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've read the description at amazon.com ...

I've been moving in and out of technical work for some years ... at the age where my breadth and wisdom seem to be needed much of the time more than programming skills. But JavaScript is one of my favorites, and I'm a big fan of dhtml coupled with JavaScript communication with outside processes. I give you this background, because ... if you read between the lines, you�ll see someone skipping in time like a rock skipping on water, picking up knowledge at each hit, but not between.

I loved Netscape's LiveConn. Later, I built my own general support for interacting with servlets through iframes. I occassionally search the web looking for evidence that something like LiveConn is now supported in standard JavaScript. I think I have found the evidence, and it looks like something like that has been in the JavaScript standard for a couple of revisions.

OK ... so half way through making a short question long ... I have the opportunity to define, if not build myself some pretty cool AJAX stuff that sometimes isn't always entirely "user-centered." I mean, I want asynchronous intereaction with back-end processes, but not just responses to clicks. Once communication starts, some processes may decide to provide updated information at any time, time and time again. This was easy enough to do with LiveConn and the iframes approach.

What I really want is that seamless use of JavaScript / Java (or other) that I got using LiveConn.

Given that: Is "AJAX in Practice" the book I'm looking for?
 
Author
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Roger F. Gay:
I mean, I want asynchronous intereaction with back-end processes, but not just responses to clicks.

Definitely possible. You could use Prototype's periodical updater, which we cover.

Once communication starts, some processes may decide to provide updated information at any time, time and time again. This was easy enough to do with LiveConn and the iframes approach.

What I really want is that seamless use of JavaScript / Java (or other) that I got using LiveConn.

Given that: Is "AJAX in Practice" the book I'm looking for?

Definitely. We have a few examples that will show you how to do periodic updates. However, if you want the server to send messages to the client and have them appear instantaneously, I do not believe we cover that. Of course, it's easy to do: just use DWR's 'Reverse Ajax' functionality. You can find DWR at http://getahead.org/dwr and more info on its Reverse Ajax functionality at http://getahead.org/dwr/changelog/dwr20

 
Roger F. Gay
Ranch Hand
Posts: 409
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. I appreciate the outside references focused on what I'm looking for. "It [DWR] allows code in a browser to use Java functions running on a web server just as if it was in the browser."

- A Java Servlet running on the server that processes requests and sends responses back to the browser.
- JavaScript running in the browser that sends requests and can dynamically update the webpage.

Perhaps I haven't read far enough yet, but what seems to be missing (compared to LiveConn) is the ability to call JavaScript functions from Java programs; thus triggering a page event whenever the Java program has something to send.

Are you sure this stuff isn't supported in standard JavaScript?
[ April 14, 2007: Message edited by: Roger F. Gay ]
 
Jord Sonneveld
Author
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Roger F. Gay:
Perhaps I haven't read far enough yet, but what seems to be missing (compared to LiveConn) is the ability to call JavaScript functions from Java programs; thus triggering a page event whenever the Java program has something to send.

Do you want to call browser-side JavaScript from a browser-side Java applet? Or from server-side Java?

javascript / applet interaction : http://www.raditha.com/java/javascript.php
javascript / server-side java interaction : DWR reverse Ajax allows this.

Make sure you're reading the DWR 2.0 docs, as Reverse Ajax was introduced in that version. You can see a small sample at Joe's blog at http://getahead.org/blog/joe/2006/04/11/1144770216929.html

Are you sure this stuff isn't supported in standard JavaScript?

Server-side Java / Client-side JavaScript interaction is not supported right out of the box, by which I mean, there is no clear, well-defined standard API for doing this.

That doesn't mean that it isn't possible to write such an API that uses XHR to create this effect; that's what Joe has done w/ DWR.





j\s
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic