aspose file tools*
The moose likes Applets and the fly likes AJAX Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "AJAX" Watch "AJAX" New topic
Author

AJAX

Gavin Tranter
Ranch Hand

Joined: Jan 01, 2007
Posts: 333
Hi all,
Just signed up to the ol' ranch. Of late i have been hearing more and more about AJAX/web 2.0, thing is i cant really see what the fuss is about, surely what you can do with AJAX can be done with an Applet?

Which leads to the question, is browser support for applets more consistant then it once was when the only examples of applets where to show how to do animation on the web? (Yes i am showing my age )

Anyway hope you are all enjoying a happy new year.

G
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

I have seen some very amazing things done with applets lately. If you can ensure that your clients install the Java plugin from Sun, which isn't a sure thing, well, then you can do some amazing stuff.

I worked on a project where a portal server (JetSpeed) delivered portlet that were really just Applets. The applets could communicate back to the server without having to refresh the page. It was pretty amazing, combining the best of the portal environment, with the best of Java applets. I really hope it catches on.

Applets are still more fat than they are phat though. Perception is a big problem.

Cheers!

-Cameron McKenzie
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
Gavin,
one of the benefits of AJAX would be that you're working with a web page, and can manipulate its layout and content to your hearts content. Once an applet is loaded its size is fixed, and its layout as well to a degree. (The layout can of course be changed, but it's not anywhere near as flexible as manipulating the DOM of a web page.)
And, unfortunately, what Cameron said is very true: Having a properly installed recent JVM in a browser is not a given.

Cameron,
was what you saw a public web site that you could point us to? I'd be quite interested to see it.


Ping & DNS - updated with new look and Ping home screen widget
Gavin Tranter
Ranch Hand

Joined: Jan 01, 2007
Posts: 333
I was just thinking, that to my mind, AJAX applications are client application running within a browser, so I was just thinking: "if its an application why not use applets? As both load in a browser."

I was expecting JVM's across browser to be, "standard" by now.

Thanks for the insights
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18117
    
  39

Originally posted by Gavin Tranter:
I was just thinking, that to my mind, AJAX applications are client application running within a browser, so I was just thinking: "if its an application why not use applets? As both load in a browser."

I was expecting JVM's across browser to be, "standard" by now.

Thanks for the insights


IMHO, although Java is much more easy to work with than Javascript -- Javascript has a few advantages. Javascript is directly attached to the HTML, so it is part of the page, and not compiled separately, and/or loaded in via a plugin.

In fact, the distinction is almost non-existant, as you can regard it as adding scripting to the HTML.

Furthermore, over the years, Javascript added better GUI components, the ability to change the page on the fly (via a DOM model), the ability to access components whether ActiveX, JavaBeans, etc. And having some built-in or easily loadable components, such as the HTTP components used for AJAX, Macromedia flash, or even Java itself, makes Javascript preferred in many cases.


I think the main reason Javascript/Macromedia/AJAX, seem to be more common than Java Applets, is that there are better tools available. Tools for the Animator and Webpage Designer, whereas Java seems to prefer the developer.

Henry

PS... of course, this is just opinion.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Henry makes some good points to Gavin's last question. But I believe the main reason for using ajax technologies over Applets is saving the user from having to install the Java plugin.


GenRocket - A Test Data Generation Platform
manoj r patil
Ranch Hand

Joined: Jun 06, 2002
Posts: 181
good points put forward by many ranchians.

Another point I think AJAX has over applet is that it can be built on any middle-ware which has power to throw HTML pages. Its not exactly true with Applet as it needs server port which can understand http and serve http response. I meant it will become complicated if applet wants to talk to some middle layer which is written in lets say ASP.


love your job and not your company;
...because you never know when your company will stop loving you!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
Applet as it needs server port which can understand http and serve http response

Applets can communicate with the host using any protocol they want - it doesn't need to be HTTP. That's actually a benefit they have over AJAX, which can only communicate using HTTP.

But applets likely won't talk to an ASP (or PHP) application precisely because that most likely emits HTML, with which the applet can't do all that much. It's more common that an applet would talk to a specialized server that does not emit HTML, but data in some form the applet can understand, and present in its GUI accordingly. That server could be a servlet, but needn't be.
[ January 02, 2007: Message edited by: Ulf Dittmer ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Applets - hidden code
Ajax/JavaScript - short loading time

Applets - pray version installed
Ajax/JavaScript - pray that JavaScript is not disabled or ActiveX is not disabled


Eric
Rickard ´┐Żberg
Greenhorn

Joined: Jan 03, 2007
Posts: 5
We have a CMS/portal product that does JSR168 portlets and fancy layouting and such things. We chose to use two applets for our main editing application, combined with AJAX for WYSIWYG instant-updates when portlet configurations change. Here's a screenie:
http://www.senselogic.se/images/18.11126f6102410ddca180002263/edit_SiteVision_2_0_3.png

The top and left side are applets, which communicate with the browser using LiveScript. The applet communicates with the server using serialized Java commands tunneled through HTTP. Portlet configurations, such as a text portlet shown in the screenie, uses Java dialogs.

It works for Windows, Mac, Linux and Solaris clients. Since it's a reasonably controlled environment we require Java Plugin 1.4.2+, and a reasonably new browser.

The applet jar is 10Mb, but with 1.5 it's down to only a couple of megs due to the new compression scheme. Applet caching is a must-have due to the size, obviously.

All in all, pretty cool. Having fancy icons makes it look non-Swing too :-)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AJAX
 
Similar Threads
Comparing RIA technologies
Browser Disable
Cracked SCMAD
Ajax Technology
Swing client Vs Applet Vs RIA (AJAX, etc)