Adam Bien's Weblog

Saturday Feb 13, 2010

Java FX App on the official winter olympics site

The "Medal Visualizer" app: http://www.vancouver2010.com/olympic-medals/geo-view works well. Its actually a good test for the penetration of the Java FX platform. See also Oracle's the press release.


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Thursday Dec 31, 2009

Some Screenshots Of The JavaFX Composer Tool

The Java FX Composer wiki was updated with some screenshots. A teaser:

 


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Tuesday Dec 15, 2009

Java FX Composer / Designer for NetBeans 6.8 - First Smoke Test

  1. Installation: smooth and fast directly from the Tools -> Plugins (don't forget to click the "Reload Catalog" button in the plugin manager). It takes about 30 seconds - you don't even have to restart NetBeans 6.8!
  2. Usability: similar to NetBeans Matisse (Swing GUI designer). A WYSIWYG designer for UIs with Source / Designer views. The resulting code is more concise, comparing it to matisse. The generated code cannot be modified in the editor manually - very similar to matisse.
  3. Generated code: actually clean and concise. It uses coordinates for the FX Nodes - so it works well. 
  4. Data Sources: Java FX composer comes with JDBC, HTTP (XML / JSON), FileSystem and File datasources, as well as nested Filters. The Java FX code is generated into a directory and is o.k. 
  5. States: an interesting vehicle for designing state transitions between states. State transition can be initiated by e.g. actions / events. Handy for navigations and designing the state changes between scenes.
  6. Data Binding: most (all?) components properties can be visually bound. Interesting: there are already built-in converters in place which helps you to convert String -> String[] or (DataSource) Records -> String[]. You can e.g. bind easily a JSON services to a list component. Binding a JSON/REST datasource to a ListView is possible in seconds. XML and other formats seem not to be supported right now.
  7. Templates: are an interesting way to scaffolding. E.g. the Desktop Form template makes the generation of a business form easier.


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Monday Dec 14, 2009

NetBeans 6.8 Java FX Editor For Production? - First Smoke Test

The editing experience was dramatically improved in NetBeans 6.8 (comparing to NetBeans 6.7 or the "old" eclipse plugin), especially:

  1. renaming (refactoring) of functions, classes etc. works like in Java
  2. moving of classes between packages works (references / imports are updated) - also with drag and drop
  3. find usages / overriding methods in open projects / current project works
  4. quick fix for e.g. imports works (alt+enter)
  5. ctrl+click navigation between classes works
  6. ctrl+o (go to type) "full text search in types" works
  7. format works
  8. "fix imports" works
  9. AND: nice, new splash screen and file icons in the project tab :-)

What I miss:

  1. (alt+insert / ctrl+i) code generation inline wizard
  2. more intelligent quick fixes like: create field / variable inline wizard
  3. out-of-the-box maven integration like in Java / Java EE projects in NetBeans 6.8

 NetBeans 6.8 Java FX editor was greatly improved, comparing it with NetBeans 6.7. The new improvements do significantly improve the productivity. I only miss tables, trees and more sophisticated components - then Java FX would be perfectly viable for enterprise, as well as, internet projects. A visual designer would be also nice :-).


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Friday Dec 11, 2009

Java FX Composer / Designer for NetBeans 6.8 - First Screenshots and Tutorial

Java FX Composer screenshots as well as first tutorials are available. Java FX Composer will (at December, 15th) be an extension of NetBeans 6.8 FX capabilities. It is similar to the already available GUI designer for Swing applications.

NetBeans 6.8 comes already with improved Java FX script editor, and especially: “...improved semantic and syntactic highlighting, source navigation, faster code completion, code folding, javadoc pop-ups, refactoring, and error detection and hints, such as fixing import statements and packages. Now you can Go to Types, Find Usages, and navigate through code with hypertext links...

With Java FX 1.3 and so the availability of tables, trees etc, Java FX will become a viable alternative to current Swing / SWT / JFace applications.


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Saturday Jul 18, 2009

How To Fix The FXEvaluator On Java FX 1.2 and JDK 1.6

A simple invocation of the FXEvaluator:

 var output = FXEvaluator.eval("{2+3}");

println(output);

Will cause the following error on JavaFX SDK 1.2 and JDK 1.6 (Mac OS X):

java.lang.NoClassDefFoundError: com/sun/tools/javafx/script/JavaFXScriptEngineFactory
        at javafx.util.Evaluator.eval(FXEvaluator.java:33)
        at javafx.util.FXEvaluator.eval(FXEvaluator.java:88)
        at dynamicfx.Main.javafx$run$(Main.fx:17)
        at dynamicfx.Main.javafx$run$(Main.fx:17)

It seems like the JSR-223 runtime is not in the JavaFX classpath. Only JDK 1.5 classes are included in the compilation and runtime classpath. Including JDK 1.6 classes directly to the JavaFX-runtime will cause another runtime-error. It seems like the Java FX SDK comes with a modified javac compiler.

To fix the problem, just prepend the script-api.jar and the javafxc.jar to the bootclasspath. This is easily possible in the file ${javafx_home}/profiles/desktop.properties. Just change the entry from:

# execute_bootclasspath_prepend=

to: 

execute_bootclasspath_prepend="${javafx_home}/lib/shared/javafxc.jar;${javafx_home}/lib/desktop/script-api.jar" 

You don't have to change anything in the IDEs. It just works in netbeans 6.5.1 FX and eclipse 3.5. After this fix, you will be even able to evaluate Java FX dynamically inside the already dynamic script :-):


var output = FXEvaluator.eval("{2+3 + (javafx.util.FXEvaluator.eval('{2}') as Number)}");
println(output);

Moving the whole value of the execute_classpath into the execute_bootclasspath_prepend with both jars (see above) prepended fixes the problem as well.


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Monday May 11, 2009

Java FX Plugin For Eclipse By JBoss - Some Screenshots

It seems like JBoss guys are working on a Java FX plugin for Eclipse. There are some screenshots available. These are actually very good news - competition is always good. Only IntelliJ is lacking Java FX support now. But who knows what happens at JavaONE :-).


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Friday Apr 10, 2009

A Nice Trading / Charting, Opensource Applet

An interesting, opensource applet, visualizes stocks, can be used for charting as well. So - check out the Sun (Java) stocks and try to predict the next deals :-).


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Monday Feb 23, 2009

Java FX (Script) And Why It Is Intriguing - Especially For Java Developers, Not Only Designers

  1. Java FX Script is consistent - everything is an expression. Knowing that helps a lot.
  2. Additional access modifiers (script-only, public-read, public-init) allow leaner approaches for building, not only visual, components.
  3. The „skeleton“ of a Java FX application is the scene graph. It is a tree structure starting with stage, scene and has nodes as leafs. It  represents a platform independent model of any visual application. You could actually map this „meta-tree“ to any technology you want. I believe this exactly happens in the desktop and mobile profiles (requires further investigation :-)).
  4. There is no additional ceremony required to call Java objects - its straight forward. Existing Java code can be easily reused.
  5. RESTful (JSON/XML) communication is supported out-of-the-box.
  6. The „bind“ operator enables building of lean Model View Presenter (Passive View / Supervising Controller) applications with clean seperation of concerns. Modification of variables and even functions are tracked directly, without implementing PropertyChangeListeners etc.
  7. Triggers killed getters and setters. You can expose attributes directly and intercept the calls when needed.
  8. Java FX Script is perfect suitable for building casual and not only „flashy“ applications. The majority of Swing components is already exposed to Java FX script.
  9. Domain specific extensions like the duration datatype or frame-based animation framework makes the development of animations easier.
  10. Java FX Script integrates very well with applets and webstart. It is a natural extension of Java-based RIAs. The idea of dragging an applet out of the browser and install it as an application is simple, but really good :-).


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Friday Feb 20, 2009

100.000.000 JavaFX Runtime Downloads - Is It Ubiquitous Now?

JavaFX runtime was already 100.000.000 times downloaded. The questions is: can it be then considered as a ubiquitous platform? And if not, when? :-)


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Interviews/About
My Recent Book
Java One 2009
CommunityOne East N.Y.C
JavaONE 2008 Interview
Search
...the last 150 posts
...the last 10 comments
greenfire.dev.java.net
Links
my.netbeans.org
Visitors
License