Borked Pseudo Mailed schreef:
> I just saw a Java applet that establishes a continuous
> connection with the server to display data like a chart
> recorder -- very cool. I did some searching to see how
> this differed from an AJAX technique along with the pros
> and cons, but so far I have yet to get much insight.
> I'm interested in performance (fastest that each can
> reliably update the browser), reliability, security, and
> customization (looks like a Java applet can be made to
> look like a chart recorder with controls), etc. So, I
> hope someone that has done both can comment on the
> differences, pros, and cons of each. I'm using JavaScript
> and doing an AJAX application that does a similar thing,
> but I have not ventured into Java and applets yet (on the
> To Do list when I have time). Thanks for the help.
>
> Yes, I know this is a JS NG, not a Java NG, but I can hope,
> right? Besides, this web interface doesn't seem to allow
> cross posting, so...
>
> Dave Boland
> ---
> d boland 9 (all 1 word) at Fastmail period fm
>
Hi,
From my own experience:
1) Java will always communicate faster once the connection is made than
a XMLhttpObject (Ajax), since using Ajax will always result in a fresh
request to the webserver, including all the overhead.
If set up right, with Java, you can keep a stream open.
2) Reliability: In my experience JavaScript + XMLhttpObject is better
supported than Java. I also came across LOADS of shitty Java installs,
not to mention the old stinking Microsoft rape act of the JVM. (But I
must admit this was years ago, maybe things improved)
Whatever the case: You must test a lot with Java on Macs, M$ machines
with different browsers, linuxes, etc.
Yes, of course you must test too with an Ajaxoid solution, but that is
much easier.
3) security: I am not sure what you mean by security.
An Ajax request is just a plain request on port 80. All man in the
middle could in principle eavesdrop.
An well configured Java applet could communicate on any port, using
encryption if needed.
Of course, using https could help for Ajax. I am not sure how this
actually is implemented (I only used plain connections myself). It might
well be transparent on https.
4) customization: Well, nothing beats an applet when it comes to
customization. An applet will appear just as you inted it to, to the
last pixel.
And an applet will be faster, once loaded.

(JavaScript is not particular fast in my experience)
I did build a few applets that did things you describe.
My main problem with applets was the erractic implementations of
different JVMs in different browsers/os. It can be a real headache.
Nowadays I prefer Ajaxoid solutions, because the code is so much simpler
and the xmlhttpObjects are behaving reasonably reliable.
Just my 2 cent.
Regards,
Erwin Moller