views:

7345

answers:

10

Everybody talks about Silverlight and Flash and Flex and how cool etc...
Java applets are very similar to Silverlight and Flex, but Java applets exist since 1995.

What is the reason we don't have any cool Java applet applications around?
My guesses so far: start up time of Java applet, restricted network connectivity, lack of dev tools, ...

Are there any cool Java applets around?
Please post links

+3  A: 

Java applets and the others are for different purposes. Applets are for code-intensive applications; Java is for programmers. Flash and Silverlight are more for presentation, and a designer will feel quite at home using these. Obviously all of these technologies are versatile enough to overlap in their function quite a lot, but Flash and Silverlight are designed to make certain things easier. JavaFX is comparable to Flash and Silverlight.

I'm not saying Java applets can't be used to make "cool" things like you see in Flash all the time, but that it takes considerably more work to do so, and is thus not the common approach. I see a lot more advanced physics simulations in Java than Flash. I've yet to see any Silverlight in the wild.

pyrochild
+1: Yeah, Silverlight is awesome for creating nice UI with good User experience (tools like blend and Visual Studio help a lot) and the separation between Code and UI is well done
Peter Gfader
+24  A: 

One of the main reasons no one uses applets is that microsoft released their own java vm which broke the java standard. It was a disaster for Java Applet writers. Applications would work on one vm, but not the other.

Another internal Microsoft document indicates that the plan was not simply to blunt Java/browser cross-platform momentum, but to destroy the cross-platform threat entirely, with the "Strategic Objective" described as to "Kill cross-platform Java by grow[ing] the polluted Java market." http://www.usdoj.gov/atr/cases/f1700/1762.htm

They effectively destroyed the reputation of Java Applets. Applets work perfectly fine now that microsoft has stopped intentionally ruining the user experience.

I'd choose Java Applets over Flash if you need parallelism, as Java supports multiple threads and flash does not.

e5
+1: Wow thank you for that link... I heard other horror stories, but this one is new. THX
Peter Gfader
The Microsoft JVM was *MUCH* faster than the Sun JVM which made it attractive. After HotSpot-based Sun JVM came out, they were faster than the Microsoft JVM, so there is not much reason these days to use the Microsoft JVM.
Thorbjørn Ravn Andersen
The IBM JVM was even faster than the Microsoft JVM. The reason people used the Microsoft JVM was microsoft shoved it down your throat if you used windows. The microsoft JVM was famously hard to remove. It just kept coming back. Moreover, fully removing it would often seriously break windows. People would update windows, then java applets would stop working. I worked help desk at the time, it would a complete hell for applet user and developers. A hell engineered by microsoft.
e5
From the same link (internal MS document): "Screw Sun, cross-platform will never work. Let's move on and steal the Java language. That said, have we ever taken a look at how long it would take Microsoft to build a cross-platform Java that did work? Naturally, we would never do it, but it would give us some idea of how much time we have to work with in killing Sun's Java."
HDave
+8  A: 

Java applets start much slower than Flash as the complete Java environment needs to be started. Additionally the download process is slower and more tedious for Java than for Flash.

Basically Flash found the right way to do what Applets tried to do.

Edit: Please note that the Java 6u10 release brought a LOT of new stuff to Java WebStart and Applet-as-application! From http://mindprod.com/jgloss/javawebstart.html:

"Starting in JDK 1.6.0_10, Java Web Start can also distribute Applets. They run in an independent window that can be dragged and resized. The Applet code is not downloaded each time, but only when the code changes. "

I have not tried this myself, but hopefully this will result in new life to Applets as you are not restricted anymore to the "window in browser page" paradigm.

Thorbjørn Ravn Andersen
That sounds interesting, maybe we will see more "Silverlight vs Applets vs Flex" blogs and articles coming up.Thorbjorn: Have you created Java applets? If yes for what? Business apps maybe?
Peter Gfader
I just tried the SetClock java applet from the provided link. The user experience of this applet is not as nice as with Flash or Silverlight (slow, strange UI, ...). But, "Out of browser" functionality, seems to be no issue for java applets. What about accessing the DOM of a hosted page? or accessing the applet from the hosted page?
Peter Gfader
I have not created applets recently, but have debugged webstart applications with 6u10 *sigh*, which is where I read it. It does not make sense to talk about DOM of hosting page if there is no hosting page, but you can have an independent applet launched "properly". Is this technology you want to learn?
Thorbjørn Ravn Andersen
@Thorbjørn Ravn Andersen >>Is this technology you want to learn? Uhh, scary, I would say no. But I am just interested in Java applets, because we have them for such a long time...
Peter Gfader
Great answer, I'm actually interested in learning more about this.
NateDSaint
I'd recommend the Java Tutorial. Concise and well done.
Thorbjørn Ravn Andersen
+13  A: 

I would like to share this cool sample with you:

javafx-vs-flash-vs-silverlight

DaDa
Wow, hard work. Does the author try to implement all the other demos with Java applets as well?
Peter Gfader
+1 for very cool demo link, got my CPU up to 100% running JavaFX + Flash ;)
Jakub
lol, it's really cool though
DaDa
+2  A: 

My personal opinion is that Flash is superior for really quick and dirty functionality, like animating images and providing audio on a website, and from a business perspective it's usually a better investment for a lot of interactive firms because their designers can crank out fairly professional dynamic interactive flash pieces faster than it would take for someone to hand-code something with a lot more flexibility.

But with the rising mobile market I think people are starting to be a little more open-minded about silverlight and javaFX, especially as the IDEs for these have evolved.

In my personal opinion, I'm getting old and cynical and hate having to pay for constant updates to Adobe's Creative Suite, and have slowly transitioned into more of a developer than a designer, so my vote always goes to the open-source solutions, and since I develop in Java I have a JRE platform instance running most of the time. But I agree with Thorbjørn Ravn Andersen that the recent changes in Java are potentially game-changing, and we'll see some drastic changes in the market soon.

NateDSaint
+2  A: 

I think the coupling of Flash with Flex makes this option as attractive for developers as for designers. ActionScript is ECMAscript compliant, and can be used like a "real" programming language. Moreover, this is also open source currently, though Adobe still charges for their Flex Builder IDE (based on Eclipse).

Ultimately, I think it comes down to penetration. The reason there are so many Windows applications is not because Windows is such a cool development environment. It's because that's where developers can sell the most software. Similarly, the main consideration for Web applications is browser compatibility. I think Flash/Flex still wins this currently, though the situation may change.

Note that Adobe tried to compete with Flash, but ultimately gave up and bought Macromedia. Now Microsoft is trying to compete. We'll see.

PFD Studio
+1 "It's because that's where developers can sell the most software." --> And we see the same with the iPhone
Peter Gfader
+1  A: 

Applets are a dead option as RIA compared to flash / silverlight today. even JavaFx, it's not a good path for a new RIA.

but, I know some cool applets out there like the one used in TopCoder.com competetion arena.

Bassel Alkhateeb
but why are they a "dead option"?
Peter Gfader
flash is the god of RIAs today, Why? 1.High perf 2.all platforms 3.downloadable at 2-3 MBs 4.lightweight executables (swf). 5.short load time compared to Java Applets and JavaFx. 6.New! with flex 4 you'll be able to write native iphone apps!!! :) 7.proven nice UIs. 10.sun is barely advancing it's Java technologies compared to the fast growing .NET and flash/flex. sun was sold to Oracle lately and that just reflects sun's performance. silverlight is new compared to flash and doesn't have that support as flash cross platform/browser. that would make flash/flex the clear winner.
Bassel Alkhateeb
Unless you have code already written in java and the switch to flash or silverlight will cost, Java (AS RIA) is a bad option.Java on the server side is still the best investment.
Bassel Alkhateeb
It is much easier for a Java programmer to write an applet and deploy it, than to learn Flash first.
Thorbjørn Ravn Andersen
+4  A: 

If I'm not mistaken, I believe RuneScape is a Java applet.

Java as a RIA has come a long way in the past couple of years. It doesn't have quite the market penetration that Flash does (some site that I don't recall showed Flash @ 99%, Java @ 91%), but it is still a viable option. If you are looking at creating "cool" effects with applets, there are a few APIs you can play with: PulpCore, jME (Java Monkey Engine)...

Java as a RIA is definitely not dead.

--

Sorry about the lack of links. This post made me want to sign up so I could respond and new users can only post one link, so I chose the best one.

Dan Watling
Dan: the link about the market penetration would be good!
Peter Gfader
I found the link. It was on Sun's site, but was presented at JavaOne 2007. "Over 91% of Internet-connected PCs have Java enabled (Source: Omniture, April 2007)." - http://www.sun.com/aboutsun/media/presskits/javaone2007/index.jsp#statsHowever, according to http://www.riastats.com/, only about 70% of browsers have Java installed compared to about 97% having Flash. I am not sure where or how either of these sites received their statistics.
Dan Watling
+2  A: 

Try PlanMieszkania.pl - it's a java applet where you can draw floor plan. This is a beta version with opengl (jogl) rendering. To display 3d window click on the last icon in the toolbar (small tv).

MarcinLe
A: 

Have worked in Flex, it is really good.

Kathir