The End of Applets
infoq.com
infoq.com
And Java was a good bedrock to build applets on - a safe language that runs everywhere in a VM.
But the implementation was terrible - let me count the ways:
* Performance was awful. Java applets performed OK (and sometimes excellently if you put the work in) once they got started but the initial start-up cost of standing the VM was just woeful. Your browser would freeze for 10-20 seconds while MBs of JVM were slowly loaded and JIT'ed. People started to avoid sites with applets for this reason. Sun never even tried to fix it, and in fact told people it was for their own good because your CPU might have changed since last time the Applet was loaded.
* The GUIs were ugly. People back then complained endlessly about the Applets looking non-standard, which was true. Big a far bigger problem was that they were just hideous. Poor default fonts (and bad font rendering), bad default colors, bad fit-and-finish. Sure you could spend time making everything look nice, but it was a huge effort. Sun did try to fix this but with limited success.
* Security. The original idea was good - perfectly sandboxed executables. But Sun fell to the pressure from people who should have known better to provide ways of calling out to native DLLs. This was a terrible idea and was the source of many, many security problems. Browsers were wise to disable applets entirely.
* Failure to respond to competition. People wanted video on the web and tried to use Java, but the Java graphics stack was pretty slow for that kind of thing. Flash came along with its bad but usable codec built in and everyone jumped ship. A missed opportunity.
If Sun had fixed these problems I might be typing this comment into a Java Applet text control with formatting and spell-checking right now.
The problem is they ran in an environment where only "dangerous" APIs were blacklisted but otherwise you had pretty much full access to all JVM features and capabilities. A blacklist approach does not work for security. It only takes one hole. With an expansive API like the JDK, that ended up being a horrible game of whack-a-mole to try and patch holes as they come up.
Applet security would have been much better done as a completely separate runtime from the standard JDK with only the APIs that make sense for applets. That, however, is a lot harder to pull off (at least initially).
Agree about everything else, though. Applets were in the right place at the right time but poorly executed. So poorly that techs like flash ate their lunch. (And I don't believe flash was particularly well executed, just better than Applets).
I think better, perhaps a few less web frameworks and paradigms atleast.
https://web.archive.org/web/20070916144913/http://wp.netscap...
Javascript deserves a lot of criticism but one thing it did right from the start was being lightweight enough for a browser
Java seems like it "weighed a ton" since its inception
But the advantage of browsers shipping with all or parts of a standard Java library would be that most webapps wouldn't need to ship a huge number of node dependencies, fewer leftpad Node debarcles and reinvention of the wheel.
Brendan Eich said there were discussions with Sun (e.g. Bill Joy) and Marc Andreessen and all agreed[1] there should deliberately be 2 languages instead of 1 in the Netscape browser:
(1) an "easier/simpler" scripting type of language LiveScript aka Javascript
(2) a "professional" compiled type of language like Java for more complex applications
So, it wasn't an accident, or case of NIH Not Invented Here, or corporate bickering.
What they didn't foresee in 1994 is that the non-professional Javascript would end up adding more (pro) features that it enabled it to eliminate the need for Java Applets.
[1] deep link to B.E. explanation: https://youtu.be/krB0enBeSiE?t=24m30s
Instead Flash took that spot! Only because Flash eventually also ended up sucking too bad (on mobile) did we get the Javascript revolution.
If Java sucked less and developed at the same pace as Flash did, but was open enough that the browsers could implement their own <applet> runtime replacements (for instance if Java was more important for the web than for the server, Google may have bought Sun instead of Oracle), we would probably live in a very different world today.
If "mobile" means the Apple iPhone release in 2007 not supporting Flash, I disagree.
The Javascript revolution for serious apps was arguably started by ~2000 Microsoft's XMLHttpRequest() api which other other browsers like Netscape immediately copied. This started the AJAX dynamic web page era ~7 years before 2007. When retrieving new data for a webpage is no longer tied to a user refreshing with F5 key or a HTML form submit() button, it enables a more desktop-like paradigm of apps such as:
- 2000 MS Outlook for Web
- 2004 Google Maps, Google GMail
- 2005/2006 Google Docs & Google Sheets (acquisitions)
These were the type of groundbreaking Javascript apps that convinced many that the often-dismissed "toy language" was viable for complex work. The later innovations such as 2009 Node.js runtime on the server side and 2008 V8 performance optimized js engine in Chrome just further cemented Javascript's domination. The Javascript mindshare momentum was already unstoppable long before Steve Job's declared that Flash sucked.
ajax was big but at best it meant slightly more dynamic business application, flash made only videos and freeform graphics ubiquitous (for better or worse)
Flash was only good for games, short animated movies and tolerable for videos and audio (before web video standards).
If any, multimedia was HUGE in late 90's. You would have a CD-ROM for ANY content, hobby or knowledge branch.
And OFC things like Shockwave (and previously, Director) made them ubiquitous.
Reminds me of one of Microsoft's first Dynamic HTML demos:
There were two buttons, one labeled "Our Web Site", the other labeled "Our Competitor's Web Site".
When you moved the mouse over the "Our Competitor's Web Site" button, it would quickly slide out from under your cursor before you could click it!
Then when you stopped moving your mouse, the "Our Web Site" button would slyly slide right underneath your mouse!
Dammit Microsoft!!! ;)
Maybe that's what Brendan Eich claimed at some point in time, but it certainly devolved into corporate bickering pretty quickly.
https://news.ycombinator.com/item?id=19837817
>Wow, a blast from the past! 1996, what a year that was. [...]
https://news.ycombinator.com/item?id=19846280
[More links and excerpts at the link above, but here is the timeline summary:]
>Ha ha! Yes, the launch of Javagator was a lot like watching the Space Shuttle Challenger blow up.
>Such glorious plans they had, then Sun and Netscape started bickering about who was going to be on top...
>But Rhino, Mozilla and Phoenix eventually rose from the ashes of the Javagator Disaster.
>December 30, 1997: Netscape sharpens Javagator plans [...]
>February 26, 1998: Netscape's Java browser in doubt [...]
>February 26, 1998: Whither Crawls Netscape's Javagator? [...]
>April 3, 1998: Will Javagator be reborn as Jazilla? [...]
>Fortunately, Netscape's Java Rhino JavaScript engine managed to make it out into the world: [...]
>Javascript Jabber: 124 JSJ The Origin of Javascript with Brendan Eich [...]
>Brendan Eich:
>And Netscape had acquired a company called Digital Styles that was known for rendering engines of some kind. And they started doing a next-generation engine in ’97 I think based on Java. And they thought, Netscape’s doing the Javagator, Netscape and Sun are going to kill Windows, Java’s going to be the future on the client side. Let’s build a Java engine. When Java got the plug pulled from it in late ’97, when the Electrical Fire JVM that Waldemar Horwat was building at Netscape got cancelled, when Sun went away because Netscape was basically going out of business slowly, the team that was doing this Java engine, this Java web engine, rendering engine called Raptor said, “Oh, we better rewrite it in,” maybe it was called Xena, I forget. They said, “We better rewrite it in C++.” And then they said, “Let’s sell it to Mozilla.”
https://news.ycombinator.com/item?id=16354069
>[...] MSFT was even afraid of AOL, Oracle, and others teaming up to offer a home appliance (eg. a net PC) at low prices and undercutting the PC industry. Of course, those partnerships and alliances never did work out. Sun and Netscape hated each other, for example. [...]
Ain't that the truth! The bitter irony is that a bunch of the Sun-hating Netscape programmers went over to AOL after the acquisition, just to be mis-managed into the ground by a bunch of "Alliance" managers from Sun.
https://www.cbsnews.com/news/aol-woos-netscape-employees/
>Case told the Netscape workers that after the merger is completed next spring, stock options will remain valuable, their sabbatical program will remain in place, and their corporate culture will remain intact.
>"Maybe you joined the company because it was a cool company," he said. "We are not changing any of that. We want to run this as an independent culture."
Pffff!!!
http://www.zdnet.com/article/a-year-ago-friction-behind-aol-...
>Netscape cancelled a project to develop a Java version of Netscape Navigator with Sun Microsystems Inc. because Netscape couldn't afford it, according to Kannegaard. Kannegaard's claims are at odds with the story Netscape told publicly about the reason it killed its so-called Javagator product. "It was explained to me that after Microsoft in their [Netscape's] words undercut their business, they could not afford to continue the project, so they had to reduce their engineering resources and cancel this project," Kannegaard said.
>That is not the story Netscape told the general public. According to a story in ZD Net's sister publication, PCWeek published Feb. 26, 1998, Netscape said it was pulling back on Javagator in hopes of getting help from Network Computer manufacturers such as Sun and Oracle Corp.
Meow!!!
https://www.cnet.com/news/aol-layoffs-slam-sun-netscape-alli...
>After the layoffs, iPlanet will largely be a Sun satellite. As of last July, only one-third of iPlanet's approximately 3,000 employees were from AOL, Sun Chief Financial Officer Mike Lehman said. Lehman has further said that Sun largely owns iPlanet's intellectual property.
Owch.
Maybe technically a better platform, but almost surely not the Web we have now
It’s never told as such, but having been around at the time I suspect JS came to be largely from Java’s lackluster performance.
I’d go so far as to say if the web had depended on client side Java it may never have taken off.
It also had to do with Java's availability being hit or miss - a lot of times, you'd have to jump through some hoops to enable Java support, whereas Javascript always worked.
This news is just about the removal of some leftover applet-related APIs in the JDK, hardly news-worthy IMHO because you couldn't do anything useful with those APIs anyway for quite a while.
It blows my mind they're still full speed ahead on this stuff when it's been deprecated for over 5 years.
Most vivid was Urbanoids, another one of Karl Hornell's applets: http://www.javaonthebrain.com/java/warp15/
There was a fun collection at the Applet Arcade: https://web.archive.org/web/20020604024000/http://theshadowl...
Obviously the entire plugin api turned out to be a “bridge to far”; security was terrible, complexity and inter-op, and useability were all atrocious. Not just applets but flash and silver light as well
They were terrible then and quite frankly I'm surprised that they lasted as long as they did.
Even Javascript itself is the product of that, because Brendan Eich was given like a week to produce the counterproposal to having Java as the main runtime in the browser. Certainly no matter how you slice it after decades of experience we were going to have some opinions about how to fix it, but how many of the JS "WTF"s could have been avoided if he'd been given so much as, let's say, two weeks?
Reading anything about Netscape in those days shows that A: the engineers were smart and experienced and worked miracles with what they were given (IMHO, far beyond anything the suits had a right to expect from them) but B: ultimately they simply didn't have anywhere near enough time to do the sort of work the suits were demanding. Ye olde "can't make a baby with 9 women in one month" struck them hard... no matter how many people they could throw at the problem, you just can't bring up an entire tech stack like that in an all-fired tearing hurry and expect good business results.
I'm deeply unconvinced that if Java itself had not been lifted by this tide that it would be the #1 programming language today. It certainly has some neat advantages over C++, but it has a lot of massive deficiencies too, and I can assure you that some of them are so obvious that I could see them in the language as a computer science senior with already a couple languages under my belt in 1999. The amount of tooling around Java to overcome those deficiencies remains quite staggering.
I find it amusing that ultimately, Sun was correct. The browser could be used to lever Microsoft out of its desktop dominance. Just not without about another 15-20 years of development. And when that development finally occurred... it was ultimately Microsoft that produced the web-based office suite anyhow.... yup, desktop Office dominance successfully displaced! By Microsoft.
Everyone should be cheering on this stumble because we came within inches of MSInternet that worked on IE only powered by the ActiveX controls or whatever other proprietary bullshit Redmond wanted to foist on us.
Outside iPads, almost everyone doing serious work on the go is using Windows tablets in some form, either proper tablets, or hybrid laptops with turnable screens or detachable keyboards.
This tool allows to safely run applets in Chrome purely in HTML5/WebAssembly/JavaScript. No plugins needed.
Over 50k users are using it, and over the years we have been shocked by how many people and businesses are dependent on this kind of legacy content.
The extension is only intended for non-commercial use, we offer business an even better/faster solution by converting Java bytecode Ahead-of-time.
Disclosure: I am CTO of Leaning Technologies, the company developing this extension and the underlying CheerpJ technology.
I live, I die, I live again
play "click.wav"
visual effect dissolve slow to grey
visual effect barn door open to page
go to page "https://example.com/"If the Java VM weren't as botched and insecure as it is, applets would still be with us, at least as an important part of internet history and retained tools and knowledge.
Also, vendoring the JVM itself by virtually all java applications lead to those vulnerabilities being exploitable for ages, even after they were publicised and fixed in the latest version. In that regard, the JVMs were usually in worse shape than the browsers' applet interface which was updated far more regularly.
Searching for "extends JApplet" returns more than 50,000 results on github.com. SwingSet2 for example is also using the class JApplet. Removing the 6 classes will break some stuff, including all my desktop apps.
Turns out I'm wrong. It seems that Java ME is still being updated: https://www.oracle.com/technetwork/java/embedded/javame/embe...