question on current state of using Java for applet

S

steveh44

I'am thinking of learning Java to do some simulations on the web, by
writing applets.

Is this still a good idea to do these days? I read some time ago that
applets do not work well in browsers and can cause problems and slow,
and such. This was few years ago.

Has things changed? Should I instead learn the new HTML5 and
Javascript for this? Or is Java still good choice to select for doing
simulation and animation to run in HTML and inside a browser?

If not, what other options are there?

Is Java 3D still exist? Should one use Java swing inside applets, or
limit it to some subset. I am looking for general guideline to use
Java as applets these days, and if this is a good idea to do. As I
said, I did read few years ago, that applets are not popular anymore.
Just wanted to check if this is still the case.

thank you guys

Steve
 
A

Arne Vajhøj

I'am thinking of learning Java to do some simulations on the web, by
writing applets.

Is this still a good idea to do these days? I read some time ago that
applets do not work well in browsers and can cause problems and slow,
and such. This was few years ago.

Has things changed? Should I instead learn the new HTML5 and
Javascript for this? Or is Java still good choice to select for doing
simulation and animation to run in HTML and inside a browser?

If not, what other options are there?

Is Java 3D still exist? Should one use Java swing inside applets, or
limit it to some subset. I am looking for general guideline to use
Java as applets these days, and if this is a good idea to do. As I
said, I did read few years ago, that applets are not popular anymore.
Just wanted to check if this is still the case.

If you have a single applet on the page that does not
interact with the HTML/JavaScript and have a reasonable
size, then the risk for problems should be very small.

Java applets are certainly not in fashion today.

Flash and SilverLigth is more common.

You can use Swing or you could use JavaFX to create
the GUI.

The possibility of JavaFX and the possibility to launch
via JNLP has actually given applet developers new
possibilities sin recent years.

It is just very few that has discovered those
possibilities.

Arne
 
R

Roedy Green

Is this still a good idea to do these days? I read some time ago that
applets do not work well in browsers and can cause problems and slow,
and such. This was few years ago.

Applets work fine. The old simple <applet HTML works fine. They still
have the disadvantage of a long wait while Java loads for the first
time. This gives Java itself the undeserved reputation of being slow.

However, Applets add a number of complications, mostly around
security. To learn, do standalone Applications first, or write Hybrid
applets and debug them as apps. See
http://mindprod.com/jgloss/applet.html

The big advantage of Applets is you can show them off easily to anyone
visiting your website. Far fewer people will download and run your
code.

--
Roedy Green Canadian Mind Products
http://mindprod.com
To err is human, but to really foul things up requires a computer.
~ Farmer's Almanac
It is breathtaking how a misplaced comma in a computer program can
shred megabytes of data in seconds.
 
R

Roedy Green

Should one use Java swing inside applets, or
limit it to some subset.

Everything works fine except for FireFox and JEditorPane.
--
Roedy Green Canadian Mind Products
http://mindprod.com
To err is human, but to really foul things up requires a computer.
~ Farmer's Almanac
It is breathtaking how a misplaced comma in a computer program can
shred megabytes of data in seconds.
 
M

markspace

Everything works fine except for FireFox and JEditorPane.


Roedy exaggerates. JEditorPane works fine too, it just doesn't render
HTML exactly the way he was expecting. Test, and you'll be fine.
 
R

Roedy Green

Roedy exaggerates. JEditorPane works fine too, it just doesn't render
HTML exactly the way he was expecting. Test, and you'll be fine.

It renders as white space, hardly a minor imperfection.
--
Roedy Green Canadian Mind Products
http://mindprod.com
To err is human, but to really foul things up requires a computer.
~ Farmer's Almanac
It is breathtaking how a misplaced comma in a computer program can
shred megabytes of data in seconds.
 
S

steveh44

The big advantage of Applets is you can show them off easily to anyone
visiting your website. Far fewer people will download and run your
code.

yup, that is the main reason I am looking at it.

But why does it say on wiki the following:

http://en.wikipedia.org/wiki/Java_applet

"Many Java developers, blogs and magazines are recommending that the
Java Web Start technology be used in place of Applets."

I've seen some really cool applets out there, but most have time
stamps from 10 years ago or so. Any new sites with new applets to
look at?

For example, went to http://javaboutique.internet.com/byDate/

And it looks like they stopped updating the date table in 2005.

I am not sure html5 and javascript will have as many features as Java
to do simulations inside HTML. Java should have much more libraries
and GUI features than Javascript I would think.

I am just worried that I do not seem to hear or see much about
applets any more. When Java was new, everyone was talking about
applets.

Steve
 
A

Arne Vajhøj

yup, that is the main reason I am looking at it.

But why does it say on wiki the following:

http://en.wikipedia.org/wiki/Java_applet

"Many Java developers, blogs and magazines are recommending that the
Java Web Start technology be used in place of Applets."

You can use JWS with applets.
I've seen some really cool applets out there, but most have time
stamps from 10 years ago or so. Any new sites with new applets to
look at?

For example, went to http://javaboutique.internet.com/byDate/

And it looks like they stopped updating the date table in 2005.

I am not sure html5 and javascript will have as many features as Java
to do simulations inside HTML. Java should have much more libraries
and GUI features than Javascript I would think.

I am just worried that I do not seem to hear or see much about
applets any more. When Java was new, everyone was talking about
applets.

Java has been very server centric for at least a decade.

Flash has taken the market that was applets 10-15 years ago.
With Silverligth as outsider today.

But what worked 10-15 years ago will still work.

And if you need to support *nix desktop users and
you just don't like Flash, then Java applets is an
obvious choice.

Arne
 
R

Roedy Green

"Many Java developers, blogs and magazines are recommending that the
Java Web Start technology be used in place of Applets."

The reason for that is the browser can't screw things up, especially
Microsoft. The browser fires up the app, but the app does not run
inside the browser.

See http://mindprod.com/jgloss/applet.html

I talk about the advantages and disadvantages of Applets, apps,
hybrids, Servlets and Java Web Start.

--
Roedy Green Canadian Mind Products
http://mindprod.com
To err is human, but to really foul things up requires a computer.
~ Farmer's Almanac
It is breathtaking how a misplaced comma in a computer program can
shred megabytes of data in seconds.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top