Fog Creek Software
Discussion Board




Applets making a comeback?

Is it just me or are Java Applets making a comeback on the web? For several years, I saw less and less of them, but now I'm seeing them all over the place.

Nick
Monday, March 17, 2003

Applets are the worst.  If only because it takes forever for the JVM to load.  If Flash and the likes were that slow, they would be shunned just like applets.  </rant>

GiorgioG
Monday, March 17, 2003

Nothing makes me quickly hit "back" more than seeing a gray box with the uninspired Java logo in the corner.

Fred
Monday, March 17, 2003

What's worse, the JVM won't unload itself once it is loaded until you close all instances of IE.  Java is definitely not for the client-side IMO.

GiorgioG
Monday, March 17, 2003

There outta be a law against java on the client.

I have to believe the worst kludge someone could possibly put together in web forms from .net is going to be superior to almost any Applet out their.

Mike
Monday, March 17, 2003

I beg to differ.

http://www.waterlogic.com.sg/smallmedia

is of my own creation.

rexguo
Monday, March 17, 2003

rexguo,

You must be running one hell of a machine - it takes my PIII 700, 256mb of RAM (50% free), 32 seconds to load your application.

Photoshop 7 (which I find to be a dog as far as startup speed is concerned) takes a touch over 15 seconds to load and it's a full blown app, not just an applet on a webpage. 

I don't think Java is up to snuff as far as startup times - Period.

GiorgioG
Monday, March 17, 2003

First thing my Professor said in a graduate level Java course was:

"Java is ssslllllooooooooooooooowwwwwwwwwwwww"

And after working with it for awhile now - that is so true...

KenB
Monday, March 17, 2003

Yeah, I can't say I'm thrilled about it either.  Maybe it's just my perception, but I swear my browser runs slower after an Applet is loaded (I mean on subsequent pages, not the applet page).  I usually close out the browser to unload the Java console and re-open it before browsing again.

Nick
Monday, March 17, 2003

Add Rational to that list, the Cavs will win then championship before rational start's up....bah!

Prakash S
Monday, March 17, 2003

On my 2.5 GHz machine, the Water Logic Light Rays Java applet "only" took 15 seconds to start.

When I tried adding a "softlight", I got the following Java exception:

null
java.lang.ArrayIndexOutOfBoundsException
    at q.p
    at q.execute
    at y.p
    at en/network/Network.executeOnce
    at en/network/Network.execute
    at LightRaysPersonal.FX
    at en/JavaFX.run
    at java/lang/Thread.run

runtime
Monday, March 17, 2003

I think Flash has replaced most uses of Java on web pages. Flash is easier for web designers that don't have a programming background. Plus Flash has a larger installed base than even Windows, so web designers don't have to worry about people downloading 20 MB JVMs or whatever.

runtime
Monday, March 17, 2003

Wow rexguo! Those are some really nice applets, once you wait for them to start.

If all applets were as fun to watch as those, the startup time might be acceptable.

Fred
Monday, March 17, 2003

Yeah I messed with those pages with the java demos and never got anything to happen. So there you are. Such is the typical experience of the user with a java applet. there are few i have ever tried that actuall do anything. I just feel lucky if all I see is a grey square and ethe computer doesn't crash.

Dennis Atkins
Monday, March 17, 2003

Oh wait, there we go one of them started running all of a sudden. Yeah that's pretty cool.

Dennis Atkins
Monday, March 17, 2003

It took 15 seconds to start in Opera and 22 seconds to start in IE.  I wonder why that would be....

It's all about tradeoff, 15 seconds is acceptable if you're accessing the page for the purpose of using the applet.  It's way too long if it's just ancillary fluff.

bob
Monday, March 17, 2003

Here is a cool Java applet. It is a map of San Francisco using GPS to track bus locations and predicted arrival times in real-time!

http://www.nextbus.com/predictor/publicMap.shtml

runtime
Monday, March 17, 2003

I honestly didn't mean for this to become an Applet-bashing bitch session.  I was just wondering whether others had noticed more Applets lately, and, if so, had any thoughts on their resurgence.

Nick
Monday, March 17, 2003

The worst thing about applets is the lack of any loading status. You end up staring at a gray box for minutes wondering if anything is going to happen.

Is this a fault of applets in general, or just the way people code them?

Matthew Lock
Monday, March 17, 2003

I haven't noticed more, but like everyone else I have my small regular worn path on the web. Maybe you've just broken out of a web rut recently?

If they solve the load/unload problems, and get the UI to match the OS a bit better, they could get popular again. I don't know of anything in the works for that type of thing though...

Robin Debreuil
Tuesday, March 18, 2003

I think rexguo's applets are pretty well made. And the load time wasn't bad, even compare to a lot of the heavy flash apps.
Now, what you are suppose to use them for, I have no idea! But they where well made.

ICQ also has a applet - IrCQ-Net - that lets you log into an IRC channel and chat with hardcore ICQ users that can help you solved your ICQ related problems. That one works very well, all though it takes some time to load it.

http://web.icq.com/help/chat/1,,1739,00.html

I agree with one of the earlier posters that said that applets really lacks load progress bars. You have no idea of what is going on inside the big gray area. Maybe a custom image instead of the gray area wouldn't be so bad either.

Rasmus
Tuesday, March 18, 2003

I believe the biggest problem is that Internet Explorer is shipped with a 6 year old Microsoft version of the java runtime. Mozilla (for example) is shipped with the Sun 1.3 runtime, which does show download progress. It also is lots faster and has many times less bugs.

Rhys Keepence
Tuesday, March 18, 2003

I have not noticed any "resurgence" at all. The site better have something really good to offer for me to have to sit through an applet load. Use Flash if you absolutely have to, but pleeease none of that Java stuff.

Just me (Sir to you)
Tuesday, March 18, 2003

I regularly use intranet-style web-deployed apps, many that make liberal use of applets.  I have noticed major differences in the quality of these applets; some a well written, load fast and run fast.  Others just take an age to load, and then are sluggish.  I imagine that how you program them really counts.

I can't abide activexes, and I can't think of a single good reason to use flash for anything...


Tuesday, March 18, 2003

A lot of maps are Java applets.  Some of the things that contribute to slowness, like array checking, make Java secure.  Most people have a buggy Flash that's open to buffer overflow.

I haven't seen any sudden huge reason to start making applets, but there are some possibilities:
- many Java programmers hanging around, making stuff for cheap -- you wouldn't believe how many people were making 3d games in Java applets
- Moore's law
- security that Flash will probably never have
- ok for inhouse apps that aren't restarted often

However, I haven't heard anything from the Java community that Sun suddenly decided to make applets compelling.

I ALWAYS turn off Java by default unless I need to use a map.  Because long-running Java processes take up lots of memory.  An embedded Java doodad that I'm not aware of will murder my system responsiveness.

Tj
Tuesday, March 18, 2003

http://www.waterlogic.com.sg/smallmedia

takes just a hair over 30 seconds to load and run on this machine. I'm using Sun's JAVA runtime, and I've got a 4mb internet connection.

It looked fantastic when it finished, don't get me wrong about that, but it takes far too long to load - I'd have given up if the point of the discussion wasn't about java's lack of speed.

Robert Moir
Tuesday, March 18, 2003

A friend of mine once said that it's called Java because in the time it takes to load the applet, you can go down the hall for a cup of coffe.  He's still right.

GML
Tuesday, March 18, 2003

Thank you guys for some of your feedback.

I wrote Small Media applets for no particular purpose except to entertain surfers with some eyecandy.

Yes the points about Java being slow/slow to load is true and it irritates me too. I mean hey, show some pity for that poor sod who has to test his own applets!

Anyway, here are some of my experiences which may serve as reference for some.

1. The MS JVM is everywhere so I must support it, but it is very old (IE6's build 3805 is 3 years old) and supports only Java 1.1.8 (uhm, not exactly either).
2. The JAR archive (an applet package) must be loaded completely before the applet can start, and the JVM must load before that.
3. The VM nor the API has any loading progress indication support, so most people either don't do it, or just do primitive things like showing a message (I do).
4. Comparing the Flash plug-in and the JVM is unfair because Flash is much smaller with a smaller purpose. 300K vs 5MB isn't a fair comparison. But many people still do that because many applets do things that Flash is doing too, so fair enough.
5. Flash is native code but Java has to go through an extra JIT-compiling step.
6. On my Athlon 1.2Ghz, IE and my applets all load+start under 5 seconds when run locally. So that leaves only network traffic to explain those 30s load times that some of you experience.
7. Neither MS JVM nor Sun's latest (!!) JVM has implemented 'lazy loading' to minimize load time. This one is really serious and those in the Java community will hear this quite often.
8. Sun spent alot more time on it's enterprise API than on it's desktop API. Fair enough, as they are being focused with their limited resources.

So all these contribute to the bad impression that Java gives alot of people. However, if properly coded and giving up portability, the MS JVM-based applet can do still do really useful things. Examples:

http://www.freearcade.com
http://www.thebrain.com
http://www.cc.jyu.fi/~jarnoh/komplex/pc/mixedbag/mixedbag.html
http://www.qarbon.com/products/viewlet/demos.html
http://www.sodaplay.com

I even remember www.nba.com having an applet to show a top-down view of a live NBA game. It shows in real-time when and where a shot is taken/missed and full stats update plus commentary. It's amazing, but they took it down and I don't know why as it worked really well.

About nick's original question, applets have always been around and will be around for awhile, and unfortunately it has no support from it's creators and has too much bad karma (applet viruses).

.rex

rexguo
Tuesday, March 18, 2003

Also, as a side note to those who say Java is slow. Here's some respectable benchmarks for your reference:

http://www.javalobby.org/members/jpr/index.jsp

You will have to register to read it, but it's worth it I assure you.

I've programmed alot in real-time C/C++/x86 assembly.
Proof:
http://www.waterlogic.com.sg/demoscene
Download and check out the source codes.

Now I've been programming Java for 3 years, and I can tell anyone: Java is not slow. I still use C++ for my job, so don't get me wrong.

Let us all be informed and responsible when we comment, especially in cyberspace where talk is cheap. Thank you very much.

rexguo
Tuesday, March 18, 2003

http://www.time.gov is a nice applet.

Siyan Li
Tuesday, March 18, 2003

I think we're going offtopic ;-)

Java as a language is probably not much slower than .NET, but their GUI code is slow as it gets
Loading the JVM is also slower than it really should be.  Why is the .NET Framework (read: VM) so much better?  The answer is not 'Java is cross-platform' - Java's been out for much longer than .NET and by now the GUI & loading speed should have been taken care of.  I remember hearing other programmers a couple of years ago saying "When you'll have a 1ghz+ PC, the JVM loading speed will be a non-issue."...guess they were wrong.

GiorgioG
Tuesday, March 18, 2003

oops...

"Java as a language is probably not much slower than .NET, but their GUI code is slow as it gets" should read:

"Java, as a VM is probably not slower than .NET"

GiorgioG
Tuesday, March 18, 2003

The flash plugin is actually over 1mb now, the main reasons it is faster than java are:

1) it isn't. It interprets p-code on the fly and worse. Actionscript is way way slower than java. However people don't try as much with it, like bitmap filters etc. All of the speed is native code in the plugin, not script.

2) it streams, so it starts to play after the first packet or so if you do it right.

3) The graphics are very fast, there seems so be some disdain inside sun for anything visual, and it shows in swing, and lets not talk about awt. Anyway, it is made solely for graphics, unlike java, to be fair.

4) I suspect the plugin preloads a bit in the browser, could be wrong though.

5) it relies on the browser for a lot, like static text, most security, most network stuff.. It isn't religiously against hooking into the OS at any time, this can really boost bottlenecks.

6) It is a 90% solution, allowing huge optimizations by taking out duplicate/seldom used/slow features. Kind of like jpg...

I think mostly though it is a culture thing, Sun just isn't into visuals as a company...

Robin Debreuil
Tuesday, March 18, 2003

Java applets seem to work well as games.  Other sites:

http://www.popcap.com
Lots of small, addictive games.

http://www.runescape.com
Primitive-looking but deeply-detailed multi-player adventure game.  Nice big world with lots of quests, skill system, etc.

Paul Brinkley
Tuesday, March 18, 2003

My experiences are thus:

- Java is slower than, but not significantly slower than, C++
- .NET is faster to startup and run

Believe it or not, the way I see things performing right now for typical tasks is just about:

.NET > unmanaged C++ > Java

*shrug* Go figure. .NET is unbelievable fast for v1.

Brad (dotnetguy.techieswithcats.com)
Tuesday, March 18, 2003

That can only be the case if you do things inefficiently in unmanaged C++. There's no way .NET is generally faster.

Frederik Slijkerman
Tuesday, March 18, 2003

Java is not significantly slower than C++??

Er, that's a troll right? Unless its how you define 'significantly'...

X. J. Scott
Tuesday, March 18, 2003

I've seen hand-coded x86 assembly run slower than C++ processed by an optimizing compiler.

here we go again...
Wednesday, March 19, 2003

X.J. -

I wrote some fairly intense number crunching Java (application) code in C++ that I ported to Java at the behest of my employers...Long story short: in typical use on the backend, Java (Hotspot) is only 10-20% slower than the equivalent C++ compiled with all optimizations.

Applets and UI's are still a different matter.

Devil's Advocate
Wednesday, March 19, 2003

In terms of GUI, .net blows java away.

Our app includes a tree view control that loads and displays thousands of entries in a second or two. The last time I did this in java, I think I literally had to grab a cup of coffee.

AEB
Wednesday, March 19, 2003

You are right, Java's Swing is horrible in speed (still) and is 'Desktop Java's Archilles Heel. On top of the tree view problem you mentioned, there's also the File Dialog problem when there are thousands of files.

It seems to me almost impossible to make Swing run much faster due to the overboard abstractions designed by Swing's Architecture Astronauts.

rexguo
Thursday, March 20, 2003

*  Recent Topics

*  Fog Creek Home