user489041
user489041

Reputation: 28312

Convert Application to Applets

I have heard and read a lot of people putting down Java Applets. I have a java a application written for the desktop. But with a few lines of code, I can deploy my application to the web as an Applet? I fail to see what is so bad about them. Can anyone inform me why simply converting my application to an applet is a bad deployment idea?

Upvotes: 2

Views: 654

Answers (3)

Andrew Thompson
Andrew Thompson

Reputation: 168845

I have a java a application written for the desktop. But with a few lines of code, I can deploy my application to the web as an Applet?

With a few lines of JNLP, you can launch your (J)Frame based project directly from a web site using Java Web Start.

..Can anyone inform me why simply converting my application to an applet is a bad deployment idea?

'Browsers'. As you probably realize, an applet is a guest in a web page that is rendered by a browser. Browser/JRE/applet interaction bugs are the bane of an applet developer. There is a new one every other week. Avoid the browser, and most of the problems are solved in a stroke.

I deploy applets on my site, though I generally only make an applet when the web page can bring something to the applet. E.G. there is a properties applet that is configured using JavaScript.

But my general advice is, avoid applets if at all possible.

Upvotes: 2

Ted Hopp
Ted Hopp

Reputation: 234857

There's nothing inherently wrong with Java applets. We have apps deployed as both JWS desktop applications and as applets.

Applets do have a few shortcomings, however.

First, a page with an applet forces the Java VM to start up if it isn't already running; this can cause noticeable lags for users on many systems. (I think this might be a source of some of the negativity for applets. They were being (over)used on web pages for things like navigation bars that can be easily handled with DHTML with much less overhead.)

Secondly, an applet in a browser tends to be a more constrained execution environment. Unless you are using JWS, you don't have access to the file system, printing, and many other resources. You can't open connections except back to the server where the applet came from. You generally can't easily resize the applet window. There are probably other issues as well.

I'm sure others will point out more shortcomings. :)

Upvotes: 1

corsiKa
corsiKa

Reputation: 82589

I personally don't see anything inherently bad about applets.

Applets do have restricted security permissions, so you will have less access to the system in question. If you're deploying over the web, though, I wouldn't expect this to be a big problem.

Upvotes: 1

Related Questions