Tuesday, May 08, 2007

JavaFX and Groovy

When I heard the announcement in the Keynote I had this sinking feeling in the back of my mind why not Groovy? In fact after looking at the JavaFX Script demo in the pavilion the code looks just like Groovy's builders. Very interesting. In the keynote Rich Green explained JavaFX Script as "unexpected" innovation but in a lot of ways it points to Sun's myopia of what is going on in the community. This is not a slam on Java FX. I'm sure it will be interesting technology if Sun promotes and supports it properly. Granted the community is large and there are so many things going on that it's hard to keep track of everything but Sun really should have taken a look at Groovy builders and tried to reuse it in Java SE somehow. That has implications beyond providing a simple interface to Java 2D but has wider impact on areas such as markup parsing and generation which are pretty awful in standard Java. We'll see. Hopefully this doesn't feed the JRuby vs Groovy trolls. I think the best way to look at it is that the Groovy approach is validated every time Sun makes a dynamic language move. Update -- Interesting snippet from the JavaFX FAQ (https://openjfx.dev.java.net/JavaFX_FAQ.html#Why_not_Groovy.3F): "Groovy and other languages have two specific traits which don't precisely meet these needs, namely that they are generic in nature and don't provide the appropriate abstractions necessary to optimize the UI design process and similarly are designed specifically for programmers other than content authors." That's pretty lame if you ask me.

Technorati Tags: , ,

4 Comments:

Blogger Avah said...

It's not lame at all, if you ask me.

Having constructs such as "do later", "dur", "bind" and "inverse" are a great asset to have in UI modeling, but in almost anywhere else they will be just redundant features that provide no value.

12:27 PM  
Blogger Steve said...

All of those constructs can be implemented as DSL features using most of the existing dynamic languages targeting the JVM right now. The fact that they are available JavaFX as well is great. However what I am calling lame is not the language itself but rather Sun's announcement and their response to the obvious comparisons they were going to get to other dynamic languages and specifically the FAQ answer about other languages. JavaFX is cool but its been done and it's nothing new technologically speaking. What I would have found more interesting is seeing work that builds upon work already being done in the Java community. Why not build on top of Groovy for instance?

12:51 PM  
Blogger Rod said...

JavaFX is obviously vastly superior to Groovy or any other language for the task at hand. Don't tell me that Groovy is the best language writing risk-assessment rules or creating electronic music. Get it?

Here's the important question. Given Groovy's obvious power and elegance, do we really need a vertical language for GUIs, insurance processing rules or music creation. I don't think builders are as effective or efficient as a vertically-oriented language. So I think JavaFX Script is a great idea, in combination with higly sophisticated tools. Groovy might be the best foundation for all of the examples I have mentioned, not Java as JavaFX Script is doing.

3:45 PM  
Blogger Steve said...

I'm not sure I would put JavaFX in a category "vastly superior" to other suitable languages given any of the tasks you've mentioned. I'm also not convinced of JavaFX Script's power and elegance. Now I must disclaim I don't spend my time writing Flash based web sites or other such scripted graphic sites but I don't hear any of those guys saying how superior JavaFX is over the alternatives especially since there are *no* tools available suitable to the types of guys that do that work. I'm afraid the jury is still out on JavaFX.

4:58 PM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home