Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AJAX

 
Gavin Tranter
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Gavin Tranter
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 20997
76
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
manoj r patil
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic