Slashdot Mirror


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."

6 of 441 comments (clear)

  1. Re:Have they fixed the startup time? by Fireflymantis · · Score: 5, Insightful

    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.

  2. Re:Hmm by AKAImBatman · · Score: 5, Insightful

    I really hate when people refer to Active-X as "viral" or something similar... Active-X is a technology like any other

    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? :-/
  3. Re:AJAX Going Away? Oh noes! by AKAImBatman · · Score: 5, Insightful
    Seems I confused you with my slightly sarcastic tone. "for(var i in object)" is a core part of Javascript and the way it works. That feature (and what it implies) are why it's so simple to fix different browsers to work like one another. If you don't know how to use it, you shouldn't be coding web apps.

    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.

    How do you know JavaFX will be so bad when they have only announced it and haven't previewed it?

    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.

    This sounds like it is targeting more than just "fetch this list box dynamically" by trying to be a way to make web pages that are currently only realistically implementable by making the entire thing in Flash.

    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! :)

    Java has the ability to do static typing.

    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.
  4. Re:Have they fixed the startup time? by josath · · Score: 5, Insightful

    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
  5. I disagree so strongly, I finally made an account! by Xenkan · · Score: 5, Insightful

    Nothing built on Javascript will ever achieve the security, cross-platform reliability, and programmatic friendliness that Web 2.0 needs.

    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.

    Proprietary solutions and vendor lock-in are also dead ends

    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.

  6. Re:Have they fixed the startup time? by Nullav · · Score: 5, Insightful

    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.