AJAX v Applet

J

John Smith

What are the pros of selecting AJAX over Applet/JApplet? (From both
development and deployment perspectives).

Kindly asking for your thoughts...
 
C

cicap

John Smith said:
What are the pros of selecting AJAX over Applet/JApplet? (From both
development and deployment perspectives).

Kindly asking for your thoughts...

The browser who host an applet is a thick client: that's all. It works
depending on the JVM installed on the client, need user to wait on start-up
to download all the byte code, etc.

A client that uses Ajax it not a thick client. Javascript is a standard, so
should be installed on every browser, and is possible to implement
cross-broweser web application. We still have start-up delay, but I think
much less: js code is lighter than byte code.

Accessibility: with Applet your web app can't be acccessible from every
browser, Ajax instead could degrade to support a non-ajax browser.

Appearence: we are on the web, what is better than HTML?

Programming point of view: depends on how your code, but usually Applet is a
monolit application, every change of the code need to recompile your class
or classes.
An Ajax application is still a web application: it is not monolit respect to
the developer point of view.
It's easier to presentation view from application logic for example, and you
take advantage from web designer experts.
 
D

Dag Sunde

cicap said:
The browser who host an applet is a thick client: that's all. It works
depending on the JVM installed on the client, need user to wait on
start-up to download all the byte code, etc.

A client that uses Ajax it not a thick client. Javascript is a
standard, so should be installed on every browser, and is possible to
implement cross-broweser web application. We still have start-up
delay, but I think much less: js code is lighter than byte code.

Accessibility: with Applet your web app can't be acccessible from
every browser, Ajax instead could degrade to support a non-ajax
browser.
Appearence: we are on the web, what is better than HTML?

Programming point of view: depends on how your code, but usually
Applet is a monolit application, every change of the code need to
recompile your class or classes.
An Ajax application is still a web application: it is not monolit
respect to the developer point of view.
It's easier to presentation view from application logic for example,
and you take advantage from web designer experts.

Just a note...

An applet can be signed, and thus get access to the clients local
file system, clipboard, printers, et.c.

AJAX/JS can't. (It can be signed, but the additional access is limited).

So if you need this kind of functionality, AJAX can't help you.
 
T

Tor Iver Wilhelmsen

cicap said:
Javascript is a standard,

.... unlike the browser's DOM. IE has its own variant of XMLHttpRequest
which Ajax uses, but hopefully IE7 will succumb to pressure and
actually do things right.
 
T

Tom Cole

To get an intelligent answer to this question, you would have to tell
us what it is you want this application to do.

If you're planning on using an Applet at all, then I can only assume
that

1. You want a very full-featured UI and/or
2. You already know desktop Java

If this is the case I would stick with an Applet (or better yet a Java
Web Start application).

If not, then you're looking for faster smoother version of a web-page.
In this case you shouldn't be considering an Applet at all, IMHO, use
AJAX.

A third option you have not mentioned is JSF (or JSP, Servlets). With
some AJAX enabled JSF/JSP libraries you can program in a relatively
(though not completely) familiar Java environment and get some of the
benefits of AJAX. It is a compromise between the two, but not the best
of either.

To me the bottom line is this. If you're planning on creating any level
of complicated UI and you're not already an accomplished Javascript
developer you are going to have some (potentially serious) headaches
starting out. This is where Applet/Java Web Start come in. But, if
that's okay to you and you like to learn/tinker, then go for AJAX.
There's definite value in knowing at least some of this technology.

If tinkering and learning from trial and error is not your cup of tea,
you don't already have a significant grasp on Javascript and DOM, but
you're sold on AJAX, you should look into a pre-built
library/development platform like Backbase, Echo or Flex, IMHO. They
make AJAX development not too difficult, plus you can learn from the
code they spit out.

Probably didn't answer any of the questions you're asking. But it is a
rather open-ended question after all.
 
T

Tom Cole

And BTW, nearly all browsers used today have the Javascript engine
required to run a full-featured AJAX client, so that's not the big
concern it would have been a few years ago.

To contrast that with Applet/Java Web Start, fewer machines come
prepared to handle these without first downloading/installing some
software (the JRE). Not all people (or businesses) are into doing that.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

John said:
What are the pros of selecting AJAX over Applet/JApplet? (From both
development and deployment perspectives).

Kindly asking for your thoughts...

Applet gives you more control.

AJAX will run on almost all client systems.

I do not really see them as alternatives.

You use AJAX if you need to interactivize some
HTML stuff.

You use Applet if you need to add some rich funtionality
within what from a HTML point of view is a black box.

Flash is more of an alternative to applet than AJAX.

So AJAX plus applet or flash.

Arne

PS: In my opinion AJAX solutions is a complete mess
from a software perspective and are only used to try and
hide the fact that it is a web app, which I can not see
a reason to. But that is a different topic.
 
C

cicap

A third option you have not mentioned is JSF (or JSP, Servlets). With
some AJAX enabled JSF/JSP libraries you can program in a relatively
(though not completely) familiar Java environment and get some of the
benefits of AJAX. It is a compromise between the two, but not the best
of either.

I don't understand this.
You can implemnt Ajax with JSF, or JSP and Servlet, as you can implement it
in ASP, PHP or other server-side environment. This is not a further option
(instead is a suboption of the ajax choice).
 
C

cicap

Arne Vajhøj said:
John Smith wrote:
I do not really see them as alternatives.

You use AJAX if you need to interactivize some
HTML stuff.

This is wrong. Web application are rich application...think to Google we
apps. They are not just an interactivization of some HTML stuff.
And Applet can get more control on the client, if signed as Dag Sunde says,
but I see few point any where they overhelm the Javascript approach.
You use Applet if you need to add some rich funtionality
within what from a HTML point of view is a black box.

Flash is more of an alternative to applet than AJAX.

Flah, Applet, Javascrit, all of them can be used to implement web
applications.
 
J

John Smith

John said:
What are the pros of selecting AJAX over Applet/JApplet? (From both
development and deployment perspectives).

Kindly asking for your thoughts...

I appreciate everyone's reponse(s).

Just a small note to clarify my position... Beside not having to have a
JRE (or Flash player) already loaded, I fail to see any advantage that
an AJAX app offers over an Applet, Web Start, or Flash based apps. The
software development process for such an app is quite a mess (I'm being
nice here!). Moreover, network/bandwidth load, server load, limitations
of HTML forms and UI elements, etc. etc. have turned me off completely.
It's always healthy to learn what others think, and at this point, I
would love nothing more than to get the input of the experts out there!
 
D

Dag Sunde

John said:
I appreciate everyone's reponse(s).

Just a small note to clarify my position... Beside not having to
have a JRE (or Flash player) already loaded, I fail to see any
advantage that an AJAX app offers over an Applet, Web Start, or Flash
based apps. The software development process for such an app is
quite a mess (I'm being nice here!). Moreover, network/bandwidth
load, server load, limitations of HTML forms and UI elements, etc.
etc. have turned me off completely. It's always healthy to learn what
others think, and at this point, I would love nothing more than to
get the input of the experts out there!

For what its worth...

I use both in the same web-apps.
I have signed applet(s) that implements an excel-like data entry
grid (whitch needs access to ave itself as csv or xml to the local
file system, print, clipboard, et.c), and the rest of the page's
interactive elements communicate with the server with AJAX.
The page's JS can also communicate (set/get) values to/from the Applet.

So there's not either/or... its both if neccessary, or simpler.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

cicap said:
This is wrong. Web application are rich application...think to Google we
apps. They are not just an interactivization of some HTML stuff.

In my book rich=interactivization so I do not see your point.
Flah, Applet, Javascrit, all of them can be used to implement web
applications.

Thanks for telling us.

Arne
 
M

Missaka Wijekoon

John said:
John Smith wrote: snip
Just a small note to clarify my position... Beside not having to have a
JRE (or Flash player) already loaded, I fail to see any advantage that
an AJAX app offers over an Applet, Web Start, or Flash based apps. The
software development process for such an app is quite a mess (I'm being
nice here!). Moreover, network/bandwidth load, server load, limitations
of HTML forms and UI elements, etc. etc. have turned me off completely.
It's always healthy to learn what others think, and at this point, I
would love nothing more than to get the input of the experts out there!

From experience, we had far more issues with Applets because many users
either did not have Java installed, had the wrong version of Java,
their Admin disabled Java or their install was screwed up and Java was
not quite working right, etc. You get the picture. With any modern
browser, Firefox, Mozilla, IE, Opera, Safari...AJAX works out of the box.


BTW, IE may not come with Java pre-installed..which leads to support
calls when users get new computers.

My $0.02.
 
A

Andrew Thompson

Missaka said:
... With any modern
browser, Firefox, Mozilla, IE, Opera, Safari...AJAX works out of the box.

While most (not all) current browsers implement JS,
the user (or SysAdmin) can also choose to disable it.

It is not the '100% solution' that people are suggesting.

Andrew T.
 
T

Tom Cole

cicap said:
I don't understand this.
You can implemnt Ajax with JSF, or JSP and Servlet, as you can implement it
in ASP, PHP or other server-side environment. This is not a further option
(instead is a suboption of the ajax choice).

Third option from a development standpoint, not from an end-user
standpoint. I think the OP was as concerned about
development/maintainability of code as he was client usability.
From a 100% client perspective, I think AJAX is a good solution. 90% of
browsers out there support it and have it enabled. Java applets cannot
boast such numbers. However, AJAX code (IMHO) is a terrible pain in the
yahoo, it's fragmented, not OO oriented (as much as the javascript
do-dos will yell that it is), and so loosely typed that I wouldn't
bring it home to meet my mother. But, if I can get Ajax functionality
just by plopping and configuring a few JSF components into Netbeans or
Sun Java Studio Creator, well then...that's a different story.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,786
Messages
2,569,626
Members
45,328
Latest member
66Teonna9

Latest Threads

Top