Meaningless Drivel is fun!
The moose likes Applets and the fly likes HTML Vs Applets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "HTML Vs Applets" Watch "HTML Vs Applets" New topic

HTML Vs Applets

Luke Zechariah
Ranch Hand

Joined: Sep 27, 2005
Posts: 128

Now a days we do not use much java applets in our applications for user interface. I also use HTML, can you please let me know which one is advantageous over the other and in which situation should one consider using HTML over Applets and vice versa.

Thank you for your time.
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi Luke,

That depends on your criteria. Personally, I prefer HTML based web applications because they are easier, and better supported across multiple browsers. For dynamic stuff in HTML, you need to use AJAX or Flash stuff.

An applet will let you do fancy stuff within the browser, without needing to go back to the server as much (although you can get most of the way there with JavaScript/DOM these days).

Applet startup times are pretty slow; there are also reports that Sun is stepping away from applets in favor of JavaFX. While the libraries will probably never leave java, they will tend to look pretty old and dated- I think that most applets tend to look pretty awful.

I'd definately recommend HTML / Ajax- they will work in more places and on more browsers.

Ujjwal B Soni <baroda, gujarat, india> <+918866008962>
"Helping hands are better than praying lips......"
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
It's not an either/or proposition (and never was). Applets can supplement HTML pages by doing client-side processing. Animations are a good example of something that's not yet possible using HTML/JavaScript if you want to target most browsers. While it's true that applets have gone out of fashion, they have gained functionality over the last few Java Plugin releases (e.g., the Common DOM API makes it possible to manipulate the page HTML from within an applet), and it's a lot easier to write cross-browser compatible applets than it used to be. Some of the things Sun did for JavaFX also benefit applets.

It's also possible to sign applets which gives them full access to the client machine - something that's not possible with DOM/JavaScript.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

Nothing to do with JSP. Moved to the Applets forum.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: HTML Vs Applets
jQuery in Action, 3rd edition