May 08, 2007The JavaFX disasterI'm trying to understand what JavaFX, which Sun just announced at JavaOne, is about. So far as I understand, it's a scripting language designed to make it easier to create user interfaces. Okay, fine, but it's still a bit vague, so I turned to the FAQ, and in particular, to two questions that were the most relevant to me: Why do I need the JavaFX Script? Isn't Swing good enough?Ugh... Well, can I have a real answer now? Isn't Swing good enough? There is absolutely no explanation why they are inventing another layer (or is it a new UI? I still don't know at this point, despite reading the FAQ twice now). No answer? Alright then, let's turn to the second question that's burning in my mind: Why isn't Groovy enough?Are you kidding me? "Generic in nature"? What does this even mean? Do these people even know about Groovy? Or about the SwingBuilder and other MOP-inspired constructs that you can use in Groovy to make the declarative/imperative impedance mismatch all but disappear? If you're going to explain why you didn't pick Groovy in an FAQ, there are plenty of reasonable justifications you can come up with (memory footprint, dependencies, etc...). But... *that*?!? Come on. Looking at the examples further, I see code snippets that are actually a severely crippled version of what Groovy can do. JavaFX appears to have some scripting abilities but it's yet another language with its new syntax and rules. For example, the symbol for inequality is... <>. That's right, <>! I'm guessing the creator of JavaFX likes Eiffel. Too bad the rest of the world hates it. By the way, can we have full code completion, code browsing and folding in our IDE for this new language? More than frustrated by the FAQ, I turn my attention to the demos and tutorials and I start to read. And here is the kicker: Before you begin, you must install the following software on your computer:That's right: you need NetBeans to run JavaFX. And suddenly, it all makes sense. Desperate to get developers to adopt NetBeans, Sun has found another way to try and lure them: invent another framework, come up with a few reasons to justify its existence and in the tutorial, mention in passing that you have to download NetBeans to even write a Hello World example. Look, Sun: JavaFX is a simple library. A jar file. A bunch of class files. I'll be happy to add javafx.jar on my class path and import javafx.ui.* (although... it's a highly non-standard import name. Did you forget the convention that you helped define?... How about org.javafx?). But tell me again: why are you forcing me to use NetBeans? Sun needs to understand that we, Java developers, are not satisfied with just using an open source version of Java: we hate proprietary lock-in. We want choice. And we want Sun to respect the choices that we made to write our Java code and acknowledge that not everyone (actually, very few of us) are using NetBeans. The timing of this announcement is quite interesting actually, since I was telling a friend just this morning that I was sad to see that despite his active blogging, Jonathan Schwartz never *ever* says anything about Java. Most of his blog posts are about Sun strategy and marketing material, and it's been obvious to me that Java stopped being Sun's priority a long time ago. This morning, I fire up my trusted Google Reader and I see that Jonathan is talking about Java! Not that this comes as a surprise: this is, after all, JavaOne week. But breaking the year long no-Java-mention embargo on his blog by introducing JavaFX is a sad reminder that Sun does, indeed, care very little about Java. Comments
Eclipse plugin is provided as well, right there, on the download page... Posted by: Vladimir Sizikov at May 8, 2007 10:36 AMFYI - there is also an Eclipse plug-in available for JavaFX from https://openjfx.dev.java.net. P.S. Sun still cares about Java :) Posted by: Roman Strobl at May 8, 2007 10:40 AMYeah, this is pretty pathetic. Evidently these assholes have never seen Groovy's SwingBuilder (which provides the same capability and more since you have all of Groovy available to you). At least Groovy is getting IDE support (although those are still works in progress at least they exist). Personally, I think Sun hates Groovy. They are balls to the wall supporters of Ruby (and more specifically, JRuby) but Groovy bugs the shit out of them. Why? They don't control it and they're worried that it might actually get popular (now that it doesn't suck anymore). So, they come up with this JavaFX crap. My guess is they offered to buy out the Groovy dev team (just like they did the JRuby team) and they said no. Posted by: Sam at May 8, 2007 10:43 AMThis is F3 rebranded isn't it? It looks to use pretty much the Groovy Builder syntax (modulo a redundant colon). You could certainly come up with convincing reasons not to use Groovy for this (J2ME support, for example). However their reasons are, as you rightly point out, ignorant nonsense. Tim Bray has had to fly all the way to London (http://www.tbray.org/ongoing/When/200x/2007/05/04/London) to find out that Groovy is in pretty heavy use in the financial sector - shouldn't Sun know that already? I really think Sun's NIH attitude will do for them in the end. Posted by: John Wilson at May 8, 2007 11:15 AMJohn -- I'm wondering the same thing. Is this just a new name for F3? I was just commenting to somebody at JavaOne yesterday that the open nature of Java with its JSRs and JCP make it hard for there to be too many surprises at JavaOne. Posted by: Michael at May 8, 2007 01:00 PMSun have just reinvented JSON. What's wrong with Rhino? Posted by: RichB at May 8, 2007 01:34 PMFunny, that was the first thing I thought when I saw JavaFX... that they should have just used Groovy. It's not even really declarative, it's just simple syntax for lambda's, hash's, lists and hang on... some other crazy stuff (bind foreach?) that would be interesting to see in a general purpose way. From a declarative point of view, it's crying out for some AOP that behaves like CSS. Posted by: fletch at May 8, 2007 02:36 PMThe target was (with java) an is (with fx) the mass programmer. Groovy is too intricate and rich. You can't be put that into the faq. Sun goes to mobile and wants to lure the mobile mass programmers, and wants to lure the mass programmers to work for the mobile - and this platform will serve them for some years. And that can be enough. Posted by: incze at May 8, 2007 04:25 PMSun is solving the wrong problem. The whole issue with rich client Java is deployment difficulties. Java Web Start and Applets both suck, particularly when compared with Flash and now Silverlight. Inventing yet another scripting language does nothing to solve the deployment problem. As the demos show, JavaFX still relies on Web Start for deployment. So users must install JREs, suffer through countless dialog boxes during the download process, and deal with inevitable errors once the Java Web Start cache becomes corrupt or some JRE-related registry key gets hosed. On top of that, JavaFX does not add any new multimedia capabilities. Nobody in their right mind would try to develop, say, a YouTube competitor using JavaFX. Flash remains the only viable option. Which is sad, because Java really is a better language than JavaScript. Posted by: Eric Burke at May 8, 2007 07:40 PMWell, you got it wrong on some parts... - The real problem is still the runtime startup time, deployment problems, resource usage, lack of well defined animation - multimedia libraries and a designer GUI designer for java 2D stuff.. JRE size is not a big deal. But JavaFX does not deserve this bashing.
Cedric, Also, I don't think you need to install Netbeans to run JavaFX itself - although you'd probably need to install it to follow the Netbeans JavaFX tutorial which you link to... Posted by: Nick at May 9, 2007 02:46 AM> For example, the symbol for inequality is... <>. You forgot about BASIC, one of the most used scripting languages... Maybe they took it from there since JFX is claimed to be simple. Posted by: BoD at May 9, 2007 03:15 AMSorry Cedric, you're losing your common sense when it comes to Sun and NetBeans it seems. JavaFX is obviously "just" a jar file... Posted by: Alexis MP at May 9, 2007 03:54 AMHey Cedric, I'm not a NetBeans apologist by any stretch of the imagination, but I've come to believe that Sun's not doing technologies to promote NetBeans, it's the other way around - they're doing NetBeans to demonstrate and promote their technologies and make them easier and more attractive to developers. Look at what I wrote near the bottom of http://blogs.zdnet.com/Burnette/?p=301 for a more long winded explanation. Also I have a lot more on JFX at http://blogs.zdnet.com/Burnette/?p=306 . Posted by: Ed Burnette at May 9, 2007 04:57 AMJavaFX is also statically typed, unlike Groovy. The real competitor in my mind is Scala. But Scala only has a half-done Eclipse plugin, so you are tied mostly to SWT. Other issues: Neither Scala nor JavaFX support generics yet. Both Scala and JavaFX I believe have a runtime library that you need to include with your apps. Say for example you want to create a library (jar) for others to use. I guess you have to bundle it with the scala or javafx runtime jar too? Also in JavaFX you have to declare all a class's attributes first (like in C or C++). I can't see any reason why they would do that except to make it easier for the compiler (vs. the developer). A small point about notation: "<>" is the symbol for inequality in pascal-derived languages; the equivalent symbol in Eiffel is "/=". No, you don't need NetBeans to run JavaFX. You just need it to do the stupid tutorial. If you must use an IDE, there's a plugin for Eclipse 3.2, as well. Or use a text editor. Cancel your rant, say "Never mind" and next time, try reading before you go off. Posted by: Bob Foster at May 9, 2007 10:40 AMAs Eric pointed out, it's all about deployment. The reason Flash now owns a monopoly in this field is the ease of deployment. It's rather transparent. Go to a flash site that requires some version of flash, you get a popup asking to install the plugin, < 1 minute and you're done (unless you're on dialup:-). I also agree with Cedric. Java is perfectly OK for rich gui environment creation (groovy is probably fine too, never tried it). Not sure why create another scripting language, other than to compete with AS3. Either way, good luck to sun, but it's doomed to fail before even the first release. Posted by: Ilya Sterin at May 9, 2007 03:49 PMCedric jumped the shark loong ago... Posted by: aa at May 9, 2007 05:23 PMI don't buy your particular comment on Netbeans, that Sun invented another language to spread its adoption. I don't think Netbeans is that poor,in fact it is good, did you check Netbeans 6. By the way, I am not Netbeans fan boy, I am an Eclipse plug-in developer. Posted by: Adi at May 10, 2007 09:51 AMSpeaking of Netbeans, this is my first JavaOne and I noticed that all of the presentations that use an IDE use Netbeans. Does Sun have some rule where if you use an IDE in your presentation you're not allowed to use a non-Sun IDE? > Doug: "JavaFX is also statically typed, unlike Groovy." ..we, Java developers, ... : we hate proprietary lock-in. Says the Windows fanboy. Oh the irony. Posted by: Anonymous Coward at May 12, 2007 09:36 AMYes yes - everyone is quick to attack Sun on the whole JavaFX thing. I for one think it's cool and pretty great. Here's why: - Unlike Flex or Laszlo, it's not XML. This means that the language is descriptive and concise. Chris Oliver specifically mentioned in his talk at JavaOne that this was a careful selection and he feels the language choice will be more maintainable and scalable long term. I think he's right. - The actual JAR is only 700 K, not 10 MB. The facts are from Chris himself - he said "you'll need a 700 kb jar". - In the modern world, how does it matter that there is even a 15 MB download? Isn't Flash, Flex or RCP all even this big, and with RCP you still need the JRE? - Anything the JAVA world you need is available. JavaFX can be a panel in a Swing application. - Chris Oliver is a brilliant guy, hands down. He can easily defend himself and his choices. - Open source! What about Adobe and Microsoft? Sure Flex is open source but what about Flash itself? No Chance. - JFX is not just for the web, but also the desktop. This is a huge plus to people writing Swing desktop apps. JFX is part of the Java Platform, not just applets. What's not to like: - The language is very early, there will be some bumps. - The name is a shock and is not very good. - The interpreter is slow. Chris mentioned that the next gen interpreter will be 10-20 times faster and compile to byte code. - Swing, SWT, AWT, RCP, SAF, Java2D and now JavaFX - I would like to see Sun come up with some guides and a unification plan. I believe JavaFX is needed and very cool. Just wait to see what people do with it. Posted by: at May 13, 2007 08:14 PMAs people pointed out: The problem with Java in the Browser is not Swing but "Deployment, Deployment, Deployment". Should I throw a chair now? Write a plugin for Java, which downloads < 1 min. Slim the JRE down (using a semantic packer, removing stuff etc.). Put it into Firefox and make it easy for IE users to install. Have some nice demos with effects. Make a very simple and nice download/install page, which is not distorted by marketing. Why oh why haven't you done that for years Sun? ps: Tried to download a JCP this morning. Didn't work with the Sun download manager and Webstart, failed on certificates, took too long etc. With the direct download link it took < 5 seconds. Q.E.D. Posted by: Stephan Schmidt at May 15, 2007 07:46 AMI wished F3 was conceived firstly as a Simula-like language, not as a GUI layout language. It would have made animation a first class construct, instead of just being part of the asynchronous framework. I've added more on my blog. Posted by: Chui at May 16, 2007 01:55 AMdon't like it? Guys, I'm keen to know does JavaFX only runs on JavaME CDC profile for now? What about CLDC? Anyone has done in-depth evaluation to enlighten me? Many thanks
JavaFX is very, very cool. Swing is hard, JavaFX makes Swing easier. Sun is whole-hog on the deployment end, it's far better than it used to be (I must run at least WebStart demo a day and NEVER have a problem). JavaFX has it's place - it's not meant to be the next general purpose scripting language, so don't bother wishing that it was. It's for pumping out GUIs. Swing is in nearly every browser, just like Flash, and it autoupdates, just like Flash, so when the quicker starting applet stuff comes out, it will come out fast, just like Flex did, and we will see a resurgence of applets on web pages. JavaFX will be a super-nice way of making those applets. There is no free lunch - but there's free software, how about that! Posted by: Michael Bushe at May 26, 2007 07:25 AMWow. You are really off base: Jonathan Schwartz mentioned Java 76 times in 54 blog posts over the past 12 months: May 27th - 2 times Yes, there was a 3 month quiet period before JavaOne, which is to be expected, you save up your good stuff for when it's most relevant. Coming from the position of "Leader of the Java World" to CEO, I'm surprised he didn't try to shed the "I'm really a nerdy developer" image that one COULD put on him (no one does). How important is Java to Sun? Read the posts. For example, on May 4th, when Jonathon was discussing the most recent revenue numbers, he mentioned a new large OEM Java Licensee and 200,000 more uses added to the Java Enterprise System. I found the FAQ clear and concise and the rationale for not using Groovy was particularly well communicated. JavaFX Script is an effective, efficient presentation generator. JavaFX Mobile (Linux with integrated Java mobile plus JavaFX Script) has amazing potential. I din't see anything useful in criticism, rather that you're confused. As others pointed out, it's the deployment issues and the smooth integration with web browsers that present the real problem. That's a JVM and Swing configuration and integration issue. If they fix that, JavaFX will really take off. Posted by: Rick O'Shay at August 25, 2007 10:35 AMI think that the number one issue with JavaFX is that you have to learn yet another language, and with little gain. There's a number of existing languages out there that can do what JavaFX does, why having to learn something else? This new language is ugly (you can get lost in the brackets a la LISP) and the metaphor is quite different from Java, which means a big learning curve for Java programmers. I wish I could be more constructive in my comments. But the more I think about it the less I see how this can be good for Sun. Posted by: Emmanuel at October 11, 2007 06:44 AM
Bad decision to create another language. Groovy is attractive to Java developers. Sun should do good support of groovy in their IDE. But it's very sad, Sun did very good support for that instead it did good support for ruby which i don't think most of Java develop will like as it's too different from java. Posted by: jianwu at October 23, 2007 08:39 PMI've been an Eclipse and Netbeans user for a number of years; initially it appeared that Eclipse was the better platform - for speed, features and stability - however Netbeans 5.0 and greater address stabilit, Netbeans 6.0 addresses features and my Intel Quad Core E6600 addresses speed... Whilst I like Eclipse, I find Netbeans has been the better of the development environments for Java (even though Netbeans is still measurably slower than Eclipse). Eclipse used to be, for me and my conditions, the best PHP development environment but now Netbeans 6.0's PHP environment rivals that of Eclipse and has certain advantages for people who don't use Linux, Windows or OS X [Solaris is my desktop]. Just about the only language that I use Eclipse for now is Perl and LISP. In addition, on my platform of choice, Eclipse is just wonky and liable to collapse; very configurable, very good and horrendously unstable. Netbeans has, from version 4.0 for me, always just worked. So, for me, Netbeans is the better development environment and I just wished they'd support Perl more. As for JavaFX being difficult for Java users to understand, it could be that I am a linguist at heart (I studied German, French, Italian and study Hebrew, Middle Egyptian and Old English) and that I am fluent in numerous programming languages, including LISP, Pascal, C, C++, Java, Groovy and Scala. The only type I'm missing is the PROLOG type languages (I still can't quite get my head around them). That said, I really can't see how JavaFX is so different from Java that a fluent Java coder couldn't understand it. It's true it can have a maze of opening and ending brackets but I'd prefer that to Python's confounded blocks by indentation paradigm. Besides, one has an IDE, or emacs or vi. If your coding environment doesn't support your coding in basic ways, maybe you should think about finding one that does rather than attempting to make the language take the blame? As for static typing, I'm used to both worlds. I'm happy as mud with Perl and understand the dangers of dynamic typing and I'm happy as mud with Java which has to be one of the most statically typed language I've come across. They both have advantages and disadvantages, but wouldn't a classical Java programmer be more used to static typing? Now, as for the comments about Ruby, JRuby and such...Sun state that the Ruby community has been more approachable and responsive than the Groovy community. Let's assume that this is true: there's two groups, one responsive and the other at best disinterested, who you say, "Let's spend some time integrating this stuff together.". It's only logical that the responsive group gets in first... So let's think a little on this: JavaFX isn't difficult to understand, it's not difficult to program if you're a Java programmer, and given that it compiles to the JVM it can probably work with Groovy classes as well... Heh! Posted by: David Lloyd at December 26, 2007 06:53 PMMicrosoft created a whole new language for it's .NET platform in C# as a reaction to Java. Perhaps Sun is taking a note from this marketing decision to create hype around JavaFX as a RIA. Will it work? Probably not. There really is no need for another language here as there was in MS land. Groovy or waterd down Java could have done the trick. JavaFX is ugly and hard to read....has nothing to do with java other than being a wrapper around Swing. They'll pull this product before the next Java One. It was a "Trial balloon"...hence the meager investment in its development. Posted by: Exil at January 9, 2008 01:57 PMWant to share first community portal for people who are interested on JavaFX technologies. (www.javafxworld.net) It offers following features. * Share, Discuss, Rate, Tell to friend, Comment any JavaFX post no, you don't need Netbeans IDE to run JavaFX.. there is JavaFXPad available and I can say it is very important to make programs in it :) Posted by: mishela at March 12, 2008 07:43 AMno, you really don't need Netbeans IDE to run JavaFX. JavaFXPad is sufficient for programming.. And I can say that it is very interesting :) Posted by: mishelka at March 12, 2008 07:50 AMhuh? what does <> have anything to do with Eiffel? okay we know you hate Eiffel, but at least say something relevant to Eiffel if you want to bash it out of nowhere. <> is the inequality sign in BASIC. And BASIC rocks. lol. Posted by: wellofsouls at April 18, 2008 05:34 AM"""as nothing to do with java other than being a wrapper around Swing""" """ There really is no need for another language here as there was in MS land.""" " it's yet another language with its new syntax and rules. For example, the symbol for inequality is... <>. That's right, <>! I'm guessing the creator of JavaFX likes Eiffel. Too bad the rest of the world hates it." Well, gee, I learned to program with BASIC as a kid, and you know what? the symbol for inequality in BASIC is... <> IF STRING$ <> "Whatever" THEN PRINT "BLEAH!" I can see how that appeal to most of the people who learned to program with Basic. Posted by: Fernando Cassia at May 11, 2008 09:32 PMJavaFX ? it's shit ! Tutorials : null JavaFX = nullPointerException Flex/Flash Adobe ... beautiful :) good :) marvellous :) .. I like it :) Perhaps one of the best things JavaFX has going for it is a lack of marketing hype. After all that's what really killed applets. Posted by: bruce at July 16, 2008 05:25 PMI had an attempt starting with JavaFX it looked very promising. The functionality of it is what I'm seeking. But....the documentation I was able to find was only about showing off the graphical features. Which is good but ventually I want to build a user interface with it. Didnt' see those tutorials. So, at the moment to me it sucks and I refuse to be a guinea pig eeh I mean early adaptor. However I won't disgard it. Maybe it needs a couple of versions before it matures to what I need. But ultimately I don't have the desire to learn yet another language. I need a declarative solution like XAML/WPF. (Contruct once, render everywhere) Posted by: mschouten at September 2, 2008 10:22 AMI had an attempt starting with JavaFX it looked very promising. The functionality of it is what I'm seeking. But....the documentation I was able to find was only about showing off the graphical features. Which is good but ventually I want to build a user interface with it. Didnt' see those tutorials. So, at the moment to me it sucks and I refuse to be a guinea pig eeh I mean early adaptor. However I won't disgard it. Maybe it needs a couple of versions before it matures to what I need. But ultimately I don't have the desire to learn yet another language. I need a declarative solution like XAML/WPF. (Contruct once, render everywhere) I Posted by: at September 2, 2008 10:22 AMPost a comment
|