473,499 Members | 1,589 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why do people prefer Ajax apps over Java applets?

>From the common user perspective (like my grandma), why would they care
if its a java applet or an ajax application? Say I want to make a chat
system on my website...If i'm doing really involved Comet push-style
data communication, and rendering everything using DHTML, why would
users prefer that over a java applet?

Moreover, say I use a java applet to transfer data through a socket
connection, then use DHTML to display the data, so that basically the
front end is the same, but the backend is differs, why would a user
prefer the comet-style programming over applet?

I'm asking because I wrote an Ajax chat system through polling, and I
want to switch to a Comet push-style system because polling just isn't
responsive enough. I want to know if I can avoid Comet (since it is
alot of overhead for the server) and just use an applet in the
background to transfer data through socket connections, then use DHTML
to render the chat boxes.

- Jason

Sep 21 '06 #1
8 2065
On Thu, 21 Sep 2006 13:33:44 -0700, jason.m.ho wrote:
From the common user perspective (like my grandma), why would they care
if its a java applet or an ajax application?
Ajax doesn't require anything on the client side outside of the browser...
I don't have the JRE installed on my machine, therefore no java.
Sep 21 '06 #2
VK

ja********@gmail.com wrote:
From the common user perspective (like my grandma), why would they care
if its a java applet or an ajax application?
>From the common user perspective they don't give a damn if it's AJAX,
SOAP, Java or Foobar :-) *But* only as long as they just come on your
page and use it. They will care if prompted first to go to some other
site, download a bounch of megs of unknown stuff, install it, and only
then come back. Many may decide do not go throu that.
And unfortunately from a common user you cannot expect a JVM installed.
Right the opposite, it will be most probably Windows XP, IE6 a not a
sign of any Java plugin.

That is really disfortunate, because Java is much better fits to the
spelled task. Whatever it does natively, with JavaScript/DOM can be
done only by rather ugly hacks and workarounds. Maybe there is some
lightweight socket listener to be used as <objecton the page? You may
look around. Overall if we can insert and script Flash, media players
and other stuff: maybe there is a way to insert AIM-like object?

Sep 21 '06 #3

VK wrote:
>They will care if prompted first to go to some other
site, download a bounch of megs of unknown stuff, install it, and only
then come back. Many may decide do not go throu that.
And unfortunately from a common user you cannot expect a JVM installed.
Right the opposite, it will be most probably Windows XP, IE6 a not a
sign of any Java plugin.
I've been led to believe Java still has a fairly wide browser
penetration -- something like 90% of visitors to my employer's website,
anyway, according to our web analytics guy.
Of course, (a) this is narrower than Javascript and Flash (both in the
95-99% range), (b) excluding or discouraging 5% of visitors is
generally not a good idea, (c) I'm not really sure how he did the
measurements and if there could be problems with that, and (d) there
may be stats out there which tell a different story. But if it's 90%,
Java certainly remains a servicable option. Asynchronous Javascript
simply has more buzz at the moment. Applets are sooo 1997. :)

Sep 22 '06 #4
weston wrote:
VK wrote:
<snip>
I've been led to believe Java still has a fairly wide
browser penetration
By the optimistic promoters or Java?
-- something like 90% of visitors to my employer's
website, anyway, according to our web analytics guy.
Unless the web site is of purely general internees (very unlikely) the
sample is no representative, and unless it never uses Java any Java
related statistics derived from its logs will be self-biasing. Remember
that a visitor to a site that needs Java who does not have Java finds a
site that does not work and so goes away and never returns to a site
that just doesn't work for them. While individuals with Java available
find a site that works, browse around it and clock up the hits, and may
even return in the future. This self-biasing effect applies to all sites
that depend upon any particular technology (flash, javascript, Microsoft
only features, etc.).
Of course, (a) this is narrower than Javascript and Flash
(both in the 95-99% range),
See above.
(b) excluding or discouraging 5% of visitors is
generally not a good idea,
Especially if the point of the site is to facilitate (possibly
indirectly) taking money from those visitors. And even more so if the 5%
is the self-biased result of a dependency on a technology and the real
impact in terms of visitors turned away is 20-25%.
(c) I'm not really sure how he did the measurements
and if there could be problems with that,
Using HTTP is enough to make accurate statistics gathering impossible.
If your " web analytics guy" is not making that clear then he probably
is not sure what he is doing either.
and (d) there may be stats out there which tell a
different story.
You can find statistics that will tell you anything at all. The numbers
themselves are always meaningless unless you know a great deal about
what is being measured and how it is being measured.
But if it's 90%, Java certainly remains a servicable
option.
That "if" and "remains" implies that you don't know anything about Java
use as it stands.
Asynchronous Javascript simply has more buzz at the
moment. Applets are sooo 1997. :)
It is possible to make a web site that is just as unusable for someone
with XML HTTP request support unavailable/disabled as it is to make a
web site that is unusable for someone with Java support
unavailable/disabled, that doesn't make either a good idea.

Richard.
Sep 22 '06 #5
ja********@gmail.com wrote:
>>From the common user perspective (like my grandma), why would they care
if its a java applet or an ajax application? Say I want to make a chat
system on my website...If i'm doing really involved Comet push-style
data communication, and rendering everything using DHTML, why would
users prefer that over a java applet?

Moreover, say I use a java applet to transfer data through a socket
connection, then use DHTML to display the data, so that basically the
front end is the same, but the backend is differs, why would a user
prefer the comet-style programming over applet?

I'm asking because I wrote an Ajax chat system through polling, and I
want to switch to a Comet push-style system because polling just isn't
responsive enough. I want to know if I can avoid Comet (since it is
alot of overhead for the server) and just use an applet in the
background to transfer data through socket connections, then use DHTML
to render the chat boxes.

Well, there are a few issues with JAVA vs Javascript.

I thing the most annoying one relates to the fact that many
browsers treat an applet as a plug-in of sorts, and typically
the UI in an applet is a bit detached from the browser, making "granny"
and the rest of us adapt to the typically differing interface.
Probably a close second is that delay while it loads.

As far as latency in javascript chat , this typically has more to
do with the phrasing of the back-end than anything else.
my context servers can even on a $150 computer pump out over
30 fat transactions a second. Far more if all they are doing is those
tiny chat lines
Sep 26 '06 #6
VK

drclue wrote:
I thing the most annoying one relates to the fact that many
browsers treat an applet as a plug-in of sorts
Taking into account that NN4 is gone way ago and Microsoft JVM joined
it too, that is the only situation you can expect on a wide run with
Java used on a web-page: just another plugin injected over <objecttag
(leaving out server-side Java like .jsp)
I'd like to avoid a la comp.lang.java.advocacy discussion here, but the
question was posed from the point of view of the most basic regular
user "like my grandma" ;-)
As far as latency in javascript chat , this typically has more to
do with the phrasing of the back-end than anything else.
my context servers can even on a $150 computer pump out over
30 fat transactions a second. Far more if all they are doing is those
tiny chat lines.
The killer with the "Comet" hack is not the per-connection load - it is
negligible. The problem is with the number of simultaneously open
connections. With a more-or-less intensive use and especially with a
sub-optimal server-side processor you'll easily get an analog of DOS
attack on your server - initiated by yourself.

As a reminder: "Comet" hack is based on the age old client spoofing
trick once used for server-side driven image animations on the page.
The core principle is to make the client think that it's downloading
some extremely large file so it would keep the channel open; you also
have to keep some minimum activity over the channel so do not let UA to
"loose the patience" with the "Connection timed out" error. That is
really all wisdom of "Comet". At the pre-historic era one used false
(enormously huge) file size reported for .gif file with server-data
overriding the same scanlines on the picture. With "comet" it is either
an artificially created "border line slow" downstream for say frame or
iframe; or the rather recent miltipart/override MIME in the ajaxoid
response.

Personally I consider all of this *now* as a manually implanted server
virus, but I may be missing the progress curb in this aspect.

In application to web-chats I see nothing wrong with an ol'good ajaxoid
making HEAD request every say second and making GET/POST request as
soon as server reports new data available. That is times more resource
saving, and with all workarounds involved for "Comet" the delay will be
nearly shorter.

Again: maybe I'm just missing the progress here.

Sep 26 '06 #7
VK wrote:
drclue wrote:
>I thing the most annoying one relates to the fact that many
browsers treat an applet as a plug-in of sorts

Taking into account that NN4 is gone way ago and Microsoft JVM joined
it too, that is the only situation you can expect on a wide run with
Java used on a web-page: just another plugin injected over <objecttag
(leaving out server-side Java like .jsp)
I'd like to avoid a la comp.lang.java.advocacy discussion here, but the
question was posed from the point of view of the most basic regular
user "like my grandma" ;-)
>As far as latency in javascript chat , this typically has more to
do with the phrasing of the back-end than anything else.
my context servers can even on a $150 computer pump out over
30 fat transactions a second. Far more if all they are doing is those
tiny chat lines.

The killer with the "Comet" hack is not the per-connection load -
<snip>

I don't uses the "comet" (Content-Type: multipart/mixed;) in my CHAT
servers.
In application to web-chats I see nothing wrong with an ol'good ajaxoid
making HEAD request every say second and making GET/POST request as
soon as server reports new data available. That is times more resource
saving, and with all workarounds involved for "Comet" the delay will be
nearly shorter.

Again: maybe I'm just missing the progress here.
Well, I don't uses AJAX in my chat client javascript code either,
just plain old DOM.
Sep 29 '06 #8
VK

drclue wrote:
I don't uses the "comet" (Content-Type: multipart/mixed;) in my CHAT
servers.
I don't uses AJAX in my chat client javascript code either,
just plain old DOM.
So let me guess from one attempt: "slow frame", right? (with
<script>...</scriptblocks coming). I used it once, it can be very
elegant, actually - yet I still prefer one real port listener over any
comets and meteors. But it's IMHO and doesn't matter.

Sep 29 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
5749
by: Dave D | last post by:
I just read something that spooked me. I'm a newbie working my way through "SAMS Teach Youself Java 2 in 21 Days." I used to code a bit in Symantec's Visual Cafe for Java about 3 years ago, but...
6
24721
by: Steven Green | last post by:
I have a java app at work I used when I had Windows 98 and never had a problem. I did a clean install of Windows XP and of course Java was not included. I went to Sun, download Java 2 Runtime...
2
2153
by: joao coelho | last post by:
We have a character based application that runs on unix. We want to be able to run the app both on unix and windows, so we thought about using java but as it happens since our app also must be...
12
4734
by: Wladimir Borsov | last post by:
On one of my web pages there is an java applets which works fine on my computer. However I noticed on some other computer that the run of java applets are disabled. I got an error message...
7
2636
by: Mario | last post by:
I've been reading some Sun Java articles where they say Applets cannot import dlls and cannot write to disk. (This does NOT apply to applications, only to Applets.) Supposedly, this is NOT...
458
20769
by: wellstone9912 | last post by:
Java programmers seem to always be whining about how confusing and overly complex C++ appears to them. I would like to introduce an explanation for this. Is it possible that Java programmers...
1
2483
by: Borked Pseudo Mailed | last post by:
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...
4
1575
by: lak | last post by:
Hi friends, I have to parse a XML file and when it is changed I need to change in the front end. If I use the settimeout() then it is working. But I don't what to use the settimeout() function. ...
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7009
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7178
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7390
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
302
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.