Sun Debuts JavaFX As Alternative To AJAX
r7 writes "Internetnews is reporting on Sun's introduction of JavaFX at JavaOne today. Looks like a combination Applet, Flash, Javascript, and AJAX with a friendly programming interface. Does this really spell the end of AJAX? I sincerely hope so. Nothing built on Javascript will ever achieve the security, cross-platform reliability, and programmatic friendliness that Web 2.0 needs. Proprietary solutions and vendor lock-in are also dead ends. JavaFX has the potential to satisfy this opportunity even better than did Java over a decade ago. Along with AJAX, let's hope JavaFX also puts paid to Microsoft's viral Active-X and JScript, and, more importantly, that it really is a web scripting language that developers can grok."
Java 5 and (even more so) 6 have really helped curb the init time of applets. Plus on windows, IIRC it stays resident so after the first instantiation of the Java VM, load up times are very small. This is not including the time required to download the required classes for the applet, but it would probably be no worse than waiting for a heavy javascript laden page to load up.
Bad phrasing on the part of the submitter and/or editors: according to the article, JavaFX isn't a "combination Applet, Flash, Javascript, and AJAX" in the technological sense, but in the sense of the kinds of features it provides. It's actually an extension to Java.
Anyway, there is one drawback it's going to have as compared to AJAX: It will require end-users to install something. As it is now, AJAX will run (to some extent) in MSIE, Firefox, Opera, Safari, and a number of browsers with similar rendering engines. Even if it gets built in to the standard JRE, that still requires people to install Java, putting it more on par with Flash (though at this point a lot of people do have Java installed).
So, how long before Sun convinces Apple to include JavaFX in their version of the JRE? Last I looked you couldn't just download a JRE for MacOS X.
It's the first instantiation that matters.. Applets are so uncommon that the average user will only come across them once per reboot.
Also, because of the most stupid thing Sun ever did, people tend to deliberately close the JVM after that first initiation. Why? Cause Sun puts a stupid little Java icon into the systray. It immediately draws attention to the fact that the JVM is in memory and people think they might get a speed boost or something by closing it. (Or something equally irrational that users think.) This was a pretty predictable result.. and the icon serves no purpose anyway, so why bother?
How we know is more important than what we know.
Actually, ActiveX is a patented Microsoft Security Hole(TM) big enough to drive a Mack Truck through. Effectively, Microsoft looked at Java Applets and said, "The biggest problem with it is that it doesn't access Windows APIs and has all that security BS. We can do better." Next thing you know, Microsoft "partners" are showing how you can access DirectDraw and Direct3D to make ActiveX components that were WAY more impressive than the simplistic animations that Java was capable of. Of course, the security implications hit Microsoft less than a year later as Malware started exploiting the system for all kinds of nefarious purposes.
Microsoft kinda-sorta shuffled it off into other areas after that. Now they're back with a vengence. Silverlight will be everything that ActiveX was going to be, but BETTER! Can you feel the excitement?
Javascript + Nintendo DSi = DSiCade
A demo of JavaFX (embedded in Java WebStart--yuck) can be found at http://blogs.sun.com/chrisoliver/ . Seeing as flash comes up instantly in browsers, even if it takes some time to download code, etc, and that web pages with ajax also render near instantly, I don't see how JavaFX is really going to appeal to end users. The JVM plugin still takes time to load on all browsers and platforms and is quite big. And on almost all browsers and platforms I've ever used, tends to lock up the browser for 10-20 seconds at a time. Further how will JavaFX integrate with HTML? Javascript?
.NET don't have these problems, mainly because flash is a fraction of the size of the entire JVM adn runtime, and .NET is always loaded and ready to go on windows.
.NET (mono notwithstanding). I really want to like Java, I really do.
Flash and
Anyway, given the current state of Java technology in the browser, I don't see this as being any different from WebStart, which everyone loves to hate because it is so clunky.
I dislike the idea of Silverlight entirely, particularly anything that relies on
I've not had, in 10 years, an easy or simple or quick Java "first time install."
Every single time it has been hard, complex, and slow. This despite wanting it to be good.
I generally have to go visit some download page, figure out which of the myriad Java acronyms I need to install, have it fail, then have to visit the page again and figure out how to do it manually, work at it, fail, and then ultimately, give up. In the very few occasions I've seen it work, there is the infamous Java load time to roll my eyes at.
Contrast with Flash, which I hate, and which I practically have to struggle, to avoid having on my computer.
That is, with Flash apps: I visit, it says, "You need flash," I click on the "OK install Flash thing," and after like 2 seconds, it's installed, and then playing whatever it was I wanted to look at.
After the very first install of Flash, I don't notice that it even loads, at all. I don't even think about it.
Also, OOP is not bolted on in Javascript. It's been there since nearly the beginning. It's just that 99% of web coders never actually learned how to code Javascript.
I've been a Java programmer for about 11 years. In that time, I've explored the VM and libraries inside-out, upside-down, and sideways. The conclusion I've come to is that Java in the browser is a bad idea. At least in the form of the J2SE. If it had been developed more like a J2ME plugin with access to the DOM, it might have been a decent replacement for Javascript. But it wasn't developed that way, and now I think it's not in a very good position to compete in that space.
You bring me requirements, and I'll show you the magic that modern web technology can perform. And it's only going to get better. My comments about Server Side Events and XMLSocket are meant to mention how much better it's going to get. SSE will effectively obsolete Comet-style requests, resulting in rich server "push" systems that can transmit nearly anything to the client on demand. No need to worry about different XMLHttpRequest implementations, it will all be automatic in the browser. Opera already supports this, and thanks to the magic of Javascript, it's easy to branch to code that makes use of it when available. Wrap it in your libraries, and you're ready. to. ROCK!
Which is its strength as a platform, and its weakness as a scripting language. Don't get me wrong, the computer scientist in me wants to go with static typing. I love static typing. It makes all the bad problems go away. But the web coder in me knows that distributed document technology needs something more flexible. Dynamic typing as in Javascript is that flexibility.
It's slightly out of date, but you might find this article I wrote to be interesting. Web technologies are really accomplishing what Sun envisioned all those years ago.
Javascript + Nintendo DSi = DSiCade
Gee, Flash 9 / Actionscript 3 has all of those features:
* Static strict typing, that throws a runtime error if you try to cast to an incorrect type
* Compiled into bytecode, with a JIT runtime
* Cross-platform (windows, mac, linux and solaris)
sig? uhh, umm, ok
Security - Javascript is NOT designed to secure a web app, security needs to happen on the server side, out of necessity!
Cross-platform - I would argue that Javascript / ECMAScript, having been standardized and distributed with all major browsers for years, is arguably the MOST supported cross-platform programming language in the world. If a computer has a browser made in the last 5 years, it supports standardized ECMAScript. And what PC doesn't have a browser?
The only incompatibilities I run into on a frequent basis are getting my scripts to create results that look the same across all browsers, and that's not Javascript's fault, it's CSS and browser support of CSS! If you have problems with the [i]functionality[/i] of Javascript, then you're probably not writing according to the well established standards, or worse yet, throwing together snippets of Javascript from all over the web like so many amatuers that give the language a bad rep.
So you would use Sun's solution, rather than the well established internationally standardized ECMAScript?
Programmatic friendlyness - Joel says it all here Personally, I've programmed in dozens of languages, and few are as flexible and enjoyable as Javascript
Javascript used to have the same status that Java applets and Flash still do, used predominantly for play things, small self-contained segments of the browser where you want to do something different. Javascript has risen above that. The world is finally realizing Javascript can be an integral part of an entire website, and that the website as a whole can be enhanced by Javascript and it's tight integration with other web standards.
This article sounds like an attempt to rehype Java applets, which frankly, have not seen the advancement and acceptance that Javascript has over the years.
Well someone needs to install Debian. :)
;)
sun-java6-plugin gets you everything you need to enjoy the 12 java applets that are on the web.
It doesn't run on an alarm clock, either. Cross-platform means that it can run on more than one platform, not everything known to man.
I just read Slashdot for the articles.
Wii - yes (flash 7, lots of sites offer flash games tailored to the wii's interface)
Cell phones - yes ("flash lite", newer phones with FL2 are equivilent to flash 7)
Pocket PC - yes (at least 6)
PSP - yes (6 or 7, not sure)
PS3 - yes (don't know the version offhand, should be at least 7 since wii has that)
sig? uhh, umm, ok