Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

AJAX v Applet

Thread view: 
John Smith - 06 Sep 2006 05:59 GMT
What are the pros of selecting AJAX over Applet/JApplet? (From both
development and deployment perspectives).

Kindly asking for your thoughts...
cicap - 06 Sep 2006 13:05 GMT
> 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.
Dag Sunde - 06 Sep 2006 15:39 GMT
>> What are the pros of selecting AJAX over Applet/JApplet? (From both
>> development and deployment perspectives).
[quoted text clipped - 22 lines]
> 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.

Signature

Dag.

Tor Iver Wilhelmsen - 06 Sep 2006 16:39 GMT
> 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.
Tom Cole - 06 Sep 2006 17:30 GMT
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.
Tom Cole - 06 Sep 2006 17:34 GMT
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.
cicap - 06 Sep 2006 18:14 GMT
> 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).
Tom Cole - 07 Sep 2006 12:31 GMT
> > 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
[quoted text clipped - 6 lines]
> 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.
Arne Vajhøj - 06 Sep 2006 17:52 GMT
> 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.
cicap - 06 Sep 2006 18:20 GMT
> 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.
Arne Vajhøj - 07 Sep 2006 01:28 GMT
>> I do not really see them as alternatives.
>>
[quoted text clipped - 3 lines]
> 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
John Smith - 06 Sep 2006 19:06 GMT
> 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!
Dag Sunde - 06 Sep 2006 19:17 GMT
>> What are the pros of selecting AJAX over Applet/JApplet? (From both
>> development and deployment perspectives).
[quoted text clipped - 12 lines]
> 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.

Signature

Dag.

Missaka Wijekoon - 07 Sep 2006 06:14 GMT
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
[quoted text clipped - 4 lines]
> 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.
Andrew Thompson - 07 Sep 2006 10:52 GMT
>... 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.
Arne Vajhøj - 08 Sep 2006 02:37 GMT
>                                                      With any modern
> browser, Firefox, Mozilla, IE, Opera, Safari...AJAX works out of the box.

Depends.

Read
http://www.musingsfrommars.org/2006/03/ajax-dhtml-library-scorecard.html
for the fine print about AJAX !

Arne


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.