Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Java Programming Sun Microsystems

Sun Debuts JavaFX As Alternative To AJAX 441

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."
This discussion has been archived. No new comments can be posted.

Sun Debuts JavaFX As Alternative To AJAX

Comments Filter:
  • by drinkypoo ( 153816 ) <drink@hyperlogos.org> on Tuesday May 08, 2007 @05:32PM (#19043565) Homepage Journal

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

    This begs the question, will anything built on Java achieve the security, cross-platform reliability, and programmatic friendliness that Web 2.0 "needs"? It is well-known that Java is a "write once, debug everywhere" solution. If it is running on the server side, It also begs the question, does it need all that? What does Java provide that other languages don't? It looks like it has a client-side component. FTFA, "One of the knocks on AJAX applications, aside from browser compatibility, is that it requires a large amount of JavaScript to be sent over the wire; that script could have something malicious embedded in it. JavaFX eliminates that need by using the locally installed Java SE files." Well well well, FUD FUD FUD. Yes, it could have something malicious embedded in it. And there could be something malicious in your Java code, too. Make a point, please?

    Also, I'm interested in having this assertion backed up somehow. Javascript is an excellent language even if some implementations are somewhat lacking. In general the use of cross-platform toolkits seems to be accelerating Web 2.0 development for many people. Is it really true that you can't do the job with Javascript?

    I'd just like to leave with this C&P and short commentary:

    "This really is write once and run anywhere," he said, reiterating a 12-year-old slogan for Java. The long-range plan is to make it so applications can be written to run on all platforms." Yes, that was Java's long-range plan as well. Note that so far, it has not succeeded.

  • Uptake.. (Score:3, Interesting)

    by codepunk ( 167897 ) on Tuesday May 08, 2007 @05:34PM (#19043607)
    First of all there is nothing at all hard about cross platform ajax programming, those hurdles have
    already been overcome. However it is over 10 years since java and applets where introduced and they
    are still slow as mud, I highly doubt any success in market penetration.

  • by QuantumG ( 50515 ) <qg@biodome.org> on Tuesday May 08, 2007 @05:35PM (#19043657) Homepage Journal
    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?

     
  • by caseih ( 160668 ) on Tuesday May 08, 2007 @05:40PM (#19043739)
    A demo of JavaFX (embedded in Java WebStart--yuck) can be found at http://blogs.sun.com/chrisoliver/ [sun.com] . 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?

    Flash and .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.

    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 .NET (mono notwithstanding). I really want to like Java, I really do.
  • by QuantumG ( 50515 ) <qg@biodome.org> on Tuesday May 08, 2007 @05:45PM (#19043833) Homepage Journal
    If it means I can write web apps in a statically typed language that is compiled I'm all for it too.

  • Re:F3 (Score:2, Interesting)

    by Scott7477 ( 785439 ) on Tuesday May 08, 2007 @05:46PM (#19043861) Homepage Journal
    Thanks a lot, pal. Now I'm going to get in trouble at the office for playing Space Invaders all day:0 I agree, it's a pretty impressive demo. It took a total of about 30 seconds to get the demo up and running....
  • Re:Hmm (Score:3, Interesting)

    by dedazo ( 737510 ) on Tuesday May 08, 2007 @06:09PM (#19044289) Journal

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

    No, they looked at Java and said "holy mother of god, this crap is slow".

    Of course, the security implications hit Microsoft less than a year later as Malware started exploiting the system for all kinds of nefarious purposes.

    Oh, without question. The problem with ActiveX is that it forces the user to implicitly trust a non-sandboxed piece of native executable downloaded from an untrusted network.

    On the other hand, if you're OK with that (or just careful) then ActiveX is great. Otherwise it's not very appealing. Though it has made things like platform- and codec-agnostic streaming audio and video possible that would have probably been impossible with Java or anything else.

    Who knows, if Silverlight does run on more than one platform it just might be the next big thing. It all depends on whether or not it's designed with security in mind rather than just snazzy features.

  • by MindStalker ( 22827 ) <mindstalker@@@gmail...com> on Tuesday May 08, 2007 @06:27PM (#19044595) Journal
    It's the first instantiation that matters.. Applets are so uncommon that the average user will only come across them once per reboot.

    And thus it really depends upon how this is used. If its used deep into a page say for something like an online word processor, where you know and expect to be waiting, versus a homepage which you expect to open instantly. Really its up to the developers to use it where it makes the most sense. Sadly few do.
  • by ShieldW0lf ( 601553 ) on Tuesday May 08, 2007 @06:39PM (#19044781) Journal
    If Sun is successful in releasing Java under the GPL, this could end up being an open source alternative to Flash/Flex and Silverlight. All three of them claim to be THE alternative to AJAX.
  • Re:Stupid branding. (Score:3, Interesting)

    by QuantumG ( 50515 ) <qg@biodome.org> on Tuesday May 08, 2007 @06:44PM (#19044873) Homepage Journal
    My personal favourite (in terms of hatred) is the Install Shield updater. WTF? Why would I ever need to update install shield? Why is that even "installed"?

  • by vux984 ( 928602 ) on Tuesday May 08, 2007 @06:44PM (#19044875)
    Actually, he was off by 100%. But that's beside the point.

    People may be annoyed by 2, 4 or even higher wait times, but they'll put up with them in the right circumstances without complaint.

    Showing people a blank screen, not so much. Show them a progress bar, and they might wait for it; especially if it contains something they need.

    The whole 'get it on the screen in 2 seconds or you've lost them' applies to online shopping, product reviews, forums, etc. But people are willing to wait 5-10 or even longer for their bank, their credit card, to file their taxes, to play a game, or to edit a spreadsheet. (As long as the 'start up time' is at START UP, and not after every click.)

    If 'web2.0 apps' like gmail took 5-10 seconds to start up, but didn't exhibit the html/javascript flakeyness that would be worth it. And a lot of the load time could be addressed with caching, and having the VM preloaded, if that was the only stumbling block, hell they really are more *application* than *webpage* -- with some browser support they could be ready to go in the background, selected like wii channels or something, for commonly visited 'sites'.

    AJAX is a mostly a train wreck on par with the spaghetti code that we inherited from the Basic/C/Cobol era. Html/javascript just wasn't designed for this sort of use. AJAX is like writing multithreaded real-time applications in Windows 3.0 or MacOS9 cooperative threading models... you can do it... and it can even mostly work most of the time if you don't bang on it too hard. But its never going to be great.

    asp.net was a decent move forward, as at least it mostly shielded the developer from the ajax mess. Unless you needed to do something .net didn't support, or worse when .net just didn't work and you had to dig into the javascript and html mess that your neat little .net app generates to find the problem and fix it.

    But we *really* need to see a good standards based framework on the browser side, that applications can be written against.

    Of course, we've always had Java and ActiveX. But Java was proprietary, and was hampered immensely by Microsofts attempts to discredit it, and embrace/extend/destroy it, including their own incompatible MSJVM, and "Visual J++" version of the language. Plus it was plagued by its own problems. Not to mention that the language itself I always found cumbersome. (I think Microsoft really did a good job with C# by comparison.) And ActiveX? Well, the less said about that plague on mankind the better. :)

    JavaFX, at first blush, looks like it might fit the bill.
  • by bberens ( 965711 ) on Tuesday May 08, 2007 @06:48PM (#19044939)
    Actually, the Opera browser on the Wii has a flash plugin, so yes. I can't speak to the PS3 or cell phone based browsers.
  • by ctr2sprt ( 574731 ) on Tuesday May 08, 2007 @06:54PM (#19045023)

    The difference here is that you're going to java.com, whereas the GP is going to java.sun.com (which is the first two hits on Google if you search for "java" [google.com]). Incidentally, I never knew java.com existed until now: at some point I Googled for "java" when I needed a JRE, and once I somehow navigated the labyrinthine recesses of sun.java.com to download what I wanted - seriously, it's reminiscent of getting the free RealPlayer - I just bookmarked that page.

  • by Phisbut ( 761268 ) on Tuesday May 08, 2007 @07:42PM (#19045669)

    Not a single XPI in existence is signed. I don't think Mozilla has even documented how to sign XPI files.

    That's a gross exaggeration. I've done (proprietary) signed XPI extensions. While it is indeed quite complicated to do, it is possible. I remember having looked for documentation have finding it very sparsely a little over two years ago. I would have thought the Mozilla team would have made it better since then, but I think I'll try documenting it now.

  • by ShieldW0lf ( 601553 ) on Tuesday May 08, 2007 @08:19PM (#19046071) Journal
    AJAX is an overused acronym. It doesn't do anything that you couldn't do with frames or popups anyways.

    The limitation was never that the XMLHttpRequest object wasn't around. The limitation was that you had to deal with the realities of sending your pages over modems, creating this pressure for dynamic pages, but older computers were too slow at processing JavaScript to allow you relief by moving much display logic into the client. You'd end up locking the whole browser.

    These problems are all dealt with now because of faster networks and faster computers. The tools in this area are just the same old shit with a shiny coat of paint for the most part.

  • by einhverfr ( 238914 ) <chris...travers@@@gmail...com> on Tuesday May 08, 2007 @08:54PM (#19046323) Homepage Journal
    My Glade point was a loose analogy. My point about XML UI was centered around Firefox and XUL (+ CSS + Javascript). So I am omitting your Glade bits from my reply because I don't think they pertain. Look at the contents of the jar files in the chrome directory from Firefox if you want a better idea of what I mean.

    The biggest issue is the underlying logic that controls the interface. For example, Cocoa allows for observers, which can be updated when state changes. Both Gtk+ and KDE do this as well (though they use the signal/slot terminology). Last time I remember looking at the Windows API, it instead used a callback method.

    You can write listeners in Javascript. They are behind a good deal of the Firefox interface, iirc.

    My main point is this: creating an interface in HTML is not an ideal medium. It doesn't provide many native elements, and creating large libraries to compensate this is hard. It is actually quite easy to imagine someone creating a platform that isn't done in an HTML page -- especially since Java already exists.

    Take a look at:

    http://www.phptr.com/bookstore/product.asp?isbn=01 31423436&rl=1 [phptr.com]

    It covers the whole XUL (which is *very* similar to HTML) + Javascript thing. It isn't that hard to set up most of what you describe. The real issue is that, like Motif or TK, the widgets available are still pretty unintelligent. Everything you need for a framework on a low level is there, however.
  • by Lobo42 ( 723131 ) on Tuesday May 08, 2007 @10:09PM (#19047005) Journal
    Because it lets you abstract easily and quickly. You don't have to worry about what type something is, you can interface with most everything the same way. In Java, this is dealt with by having a huge inheritance tree. If you want high-level behavior for a low-level class, you have to make sure it inherits all the way back up to class x, then write a method that takes the abstract class and operates on it. But half the time this still doesn't work (especially when the primitive types get involved.) So you end up with wrappers and the same object adhering to about 12 different interfaces just to use a *single* function. And don't get me started about how much of a pain it is to pass functions as arguments... In JavaScript, if I receive an object, I can just iterate over it to look at its properties - I don't even need to know what they are. I can construct functions on the fly, pass them in as arguments along with an object (that I just recently constructed, without any class definition), and have that function run on each property of the object. It's one step away from having first-class continuations. The apparent advantage of Java is having strict types - so if something adheres to an interface or abstract class, you just "know" it will have x,y,z and can do m and n. But very often (mostly sloppy programming), this isn't the case, so you have to check for things anyway. And why did you even try to pass in something that wasn't going to work with that function to begin with? In JavaScript, you have the flexibility to just pass it in. If it works, it works, if not - why did you pass it in? Ultimately, you still have to know what you're doing, so compile-time checks aren't really useful for catching more than typos. As far as I'm concerned, Java doesn't even come close to the power of JavaScript. Java likes big, bloated classes that are fixed at compile-time with LongNamesLikeThis. It has most of the drawbacks of C++ with almost none of the benefits. The only thing it has going for it is a huge API, but even that is so slow as to be useless for anything like graphics code. Heck, JavaScript is even more cross-platform than Java - and that's what Java was designed for! (Everything has a browser these days.) AJAX programming is weird, young, unpolished and tricky. But it already has more promise than a Java applet ever will. (Reserving judgement on this new JavaFX or whatever...but not holding my breath.)
  • by sr180 ( 700526 ) on Tuesday May 08, 2007 @10:13PM (#19047041) Journal

    The linux kernel is a good example of this, as it won't compile under anything but GCC.

    I know of people having compiled the linux kernel under the Intel Compiler for quite a bit of a speed increase.

  • by icknay ( 96963 ) on Tuesday May 08, 2007 @10:28PM (#19047161)
    Hellooooo everyone, the issue is not that historically the JVM takes forever to load or that Flash can be annoying. The key trend is that AJAX/Html are hitting a limit, which leads to all this recent energy about Flash/Flex as a better way to construct rich UIs, witness Microsoft's Silverlight.

    Now both Flash and Silverlight are totally proprietary. That's a huge problem. If one of them were to "win" and get a zillion developers ... well gee it seems historically this has led the winning vendor treat us all like crap. That's a real bummer when you have this expensive time investment in your website, but it's locked in to some vendor's intellectual property. The only other open rich alternative -- SVG + Javascript -- appears a bit dead.

    So what's neat about this announcement, is that it's a Flash workalike that's OPEN SOURCE. If it were to "win" ... that would be awesome. Even if the technology is just ok, the openness would make it worthwhile. Just think ... it could work properly on Linux and phones and what have you. This is very much like what happened with HTML originally. Just an ok spec, but the openness catalyzed all sorts of growth and competition.

    Another way this could work out is that it bluffs Adobe into opening up Flash, which I figure would be just as good an outcome. The key is to not be stuck developing your expensive web app, but with some vendor controlling the underlying technology.
  • Strongarming Mozilla (Score:3, Interesting)

    by wonkavader ( 605434 ) on Tuesday May 08, 2007 @10:44PM (#19047287)
    Well, if they do a decent job at this, in the next version, once they have the bugs out, they could strongarm the mozilla organization into including it in the firefox download. They could muscle them by, for instance, paying them.

    That would go a long way toward maiking this idea fly.
  • by suv4x4 ( 956391 ) on Tuesday May 08, 2007 @10:59PM (#19047419)
    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?

    Please don't insult our intelligence. So far it doesn't look like it spells the end of anything, except tha fact Sun hasn't learned anything yet about doing business in that area.

    Flash had success early on basically because it was very small, very fast, and had the top tools on the market (the Flash IDE). Truth is, that sometimes the classical sentence reverses, and we're as good as the tools we use.

    These tools, and early on Flash almost didn't have overlap with the things people used HTML/JS for. So there was a set of distinct reasons where you wanna go Flash and that's it.
    Do you imagine JoeCartoons.com if the guy had to code his toons in Eclipse? All the inspiring experimental and artsy sites, "experience" movie and games sites.

    Silverlight has its distinct feature in better video experience, and a great runtime that supports theoretically any language on the planet as long as you write the compiler for it (and the existing subset if quite impressive already).

    Granted, it's not quite distinct, as the Flash products have evolved tremendously in the meantime.

    So, Adobe:

    Has open source language machine (that will be part of Firefox 3), Flash CS3 for creative minds / animators / experimentators. It has Illustrator CS3 and Photoshop CS3 integration for designers and illustrators. It has Flex for developers (which is going to be opensource within a few months). It has tight workflow integration with its audio/video toolsets for delivering great video on the web.

    Early market killer feature: animation and rich expressiveness (current killer feature, widespread use and packs lots of useful features in a light runtime).

    Flash has 98% installed base.

    Microsoft:

    Has open sourced the DLR, and there's an open source implementation of the CLR in Mono. It has Microsoft Expression Studio for creative minds / animators / experimentators, and illutrators/designers. It has Visual Studio for developers (which has a free version as Visual Studio Express). It has tight integration with Windows Media and a cheap way to stream high quality videos over the internet with a small investment.

    Early market killer feature: easy to deploy HQ video, hot runtime (CLR of .NET), best dev tools (Visual Studio), uses existing .NET experience.

    Silverlight has the support of major companies in the field, and Microsoft is expected to utilize its windows monopoly (Windows Updates) and throw a lot of marketing money to quickly increase its installed plugin base.

    Sun:

    Has open sourced their engine and have a myriad of development tools that overlap each other in terms of where they sit in the market. Nothing for animation, designers, illustrators, experiementators. Basically designers are left out in the cold.

    No partner announcements, and if JavaFX requires the full JRE it means a slow and clunky experience. If it's a new plugin means 0% market coverage and no money to burn for marketing and partnerships to improve on that. No easy to use integrated video toolsets, no light cross-platform, skinnable components that provide functional and rich experience.
    And no trust that Sun can have success after too many failed attempts in the area.

    Early market killer features: ??? ("kinda better than JS" ?)

    What on Earth is Sun trying to accomplish?
  • by chromatic ( 9471 ) on Tuesday May 08, 2007 @11:55PM (#19047819) Homepage

    * Cross-platform (windows, mac, linux and solaris)

    They have a non-x86 Linux version now?

  • A good software engineer sees both and asks what the hell! And a bad one just codes around things as they are, and asks nothing. He's too busy talking about how l33t he is on Slashdot.

    And the experienced engineer knows that cross-platform problems follow you everywhere. At some point you need to stop whining and get the work done. If we simply complained about the platform technologies all the time, there would be no POSIX programs, no Win32 programs, and a much smaller pool of good Java programs. Specs are specs, and they tend to get interpreted differently. As an experienced engineer you should have long ago learned how to normalize these differences rather than simply throw up your hands in frustration.

    This is not to malign JavaScript, but seriously, why should you need JavaScript to make a simple HTTP request from a browser?

    How does one answer this question? Of course you don't need Javascript for a "simple HTTP request". You need Javascript to dynamically modify the DOM, restyle the layout, respond to user input, and manage a less-than-simple HTTP request all at the same time. And like the "vealed calf" that I supposedly am, I've been finding that this design has many superior aspects when compared to a Java or Flash program. (Even though I'm actually supporting Flash with an AS2.0 version of the same APIs.)

    Here's something for you to ponder. I am creating these APIs because the target environment does not support Java. It supports Flash and it supports advanced Javascripting. So like the "vealed calf", I am targeting the platform out of necessity. And you know what I've found? It's not actually as bad as everyone is making it out to be. The pitfalls are well documented and/or testable. Mostly minor cross-platform issues that will go away with each browser release. So it becomes quite easy to patch minor holes in the interim.

    [lots of blah, blah, blah about security]

    You know what we didn't have 10 years ago? An internet on which the vast majority of the world's population performed financial transactions. An internet that targeted your average consumer rather than business folk or hackers. An internet through which financial gain could be obtained by disrupting the normal flow of traffic.

    You may be too young to remember when "Client/Server" was the latest hotness, but I remember it well. And I can tell you right now that we would have been no safer with those programs than we are with some of the moronic coders we have today. I just loved it when it was possible to telnet into a port and start executing commands before passing login credentials, because no one had ever tested the no-credential situation. All their code assumed that things happened in a certain order without ever verifying the case.

    If you want to point a finger at the security problems of the web, then how about starting with yourself? Specifically, you and every programmer who writes software for the web. Computers Software is an engineering discipline just like any other. If you fail to apply proper engineering principles, you will fail. Those principles don't get learned overnight. They take years to cultivate and grow. Unfortunately, the industry wants fast answers and cheap programmers. They are rarely willing to pay for older programmers with strong skills to head up teams and ensure that the engineering is done right. Instead, they first try junior programmers, then outsourcing, then offshoring. All in an attempt to make a process cheaper by cutting corners.

    You accuse me of trying to show off my "l33t"ness (whatever the hell that is). Well, how's this for "l33t"ness: A recent security advisory revealed that JSON objects were vulnerable to a cross-scripting exploit by the very nature of being serialized Javascript objects. It was mentioned that it was the first exploit that could target only AJAX-enabled applications. Well, I use JSON. And you know what I found when

  • by macro187 ( 1079859 ) on Wednesday May 09, 2007 @01:11AM (#19048287)
    Why is parent flamebait? He/she's right. Didn't we all just spend the last half decade trying to get rid of Flash, preaching standards support, accessibility, CSS, etc, lambasting MS for shitty standards support in IE?

    Anyways,

    "Internet browsing via a wireless device is showing robust growth in many global markets. France and the U.K are exhibiting the strongest growth in this trend"

    "four in 10 adults browse the Internet on their wireless handset in Japan"

    http://www.ipsos-na.com/news/pressrelease.cfm?id=3 049 [ipsos-na.com]

    With those kinds of numbers, anyone developing applications that don't work anywhere (especially mobile phones) should be fired.
  • by Anonymous Coward on Wednesday May 09, 2007 @02:42AM (#19048703)
    Funny how this whole thread is going off on so little information.

    Along with JavaFX, Sun is going to have (1) a version of the JRE which initially only loads a kernel and then loads the rest on demand and (2) pre-loading of critical JVM bits into the disk cache. Between these two the download size should go down by >60% and the load time to under 2 seconds.

    So what's the issue here?
  • by Master of Transhuman ( 597628 ) on Wednesday May 09, 2007 @04:03PM (#19057147) Homepage
    WHY when I see Slashdot pages 1 to x at the top of a topic, and I click on page 2, I get page ONE ALL OVER AGAIN?

    And sometimes page 3 and beyond behave the same way? At some point, I start getting new pages with new responses, but it's incredibly annoying to have to click on two or three pages to get PAST page one!

    Are my settings fucked up, is it Firefox, what the hell is it? This happens on Windows, Linux, anything! Is this a known bug in Slash or what?

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...