473,507 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java Applet vs. AJAX for continuous data

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

Jun 27 '08 #1
1 2483
Depends what you mean by 'continuous connection'.

I wrote a Java Server along with an Applet which allows continuous
connections using Sockets. I also wrote the Server to allow multiple
connections which is what you will have to do when you write yours
else only one applet can connect at any one time.

If your using Ajax then you can give the impression your continuously
connected by querying the server in short intervals, but your never
continuous connection, your just calling a php/asp/what ever file on
the server and getting hte response.

In my case I chose Java sockets because I built a chat room. I didn't
use a database which meant the server updated all the users connected
automatically using the open sockets which require a Constant open
connection. e.g. someone said something in the room, the message was
sent to the server, the server updated all open connections with the
new words.

Unless you need major two way communication I would use Ajax. You
could Use JSON as your data transfer method or just plain old XML

Have fun!
Graham
Jun 27 '08 #2

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

Similar topics

5
3366
by: apchar | last post by:
I am trying to use php as a kind of servlet to act as a middle man between a java applet and mysql. I know java has jdbc but it's flakey and painful. php access to mysql is much nicer. So I have:...
1
5729
by: James | last post by:
I am trying to set up a PHP file that receives data from an applet via Java's URL object (this sends a URL so I can place PHP attributes in this), gets a set of numbers from a database table and...
1
9585
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
4
2957
by: Grant | last post by:
Dear All, I have found many systems out there uses Applet to take care of real-time data like market data, is there a way to use .Net to build something similar to that? if there is one, from...
2
6926
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
8
2069
by: jason.m.ho | last post by:
>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...
4
4024
by: JNeko | last post by:
hello all, I have tried my hand at this for a couple hours but no luck. I am using JCreator. I used these two links for reference: http://www.tech-recipes.com/java_programming_tips1265.html...
0
7223
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
7114
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
7377
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...
1
7034
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7488
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
5623
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
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1544
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 ...

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.