26 April 2010

JavaFX 1.3 Tooling

Many people are bound to cover what is new with JavaFX 1.3. Instead of covering the same thing I will cover the tooling for JavaFX 1.3. NB 6.9 Beta and JavaFX Composer for NB 6.9 Beta will be covered in this blog post. Currently in terms of cross platform tooling for JavaFX there is Inkscape (for creating images in FXD/FXZ format), NB (main JavaFX IDE), and JavaFX Composer (JavaFX GUI Builder in NB). As for the JavaFX Authoring tool it is currently in Alpha, though it will soon be at the Beta stage.

Most of the changes for the NB JavaFX editor is with hints and formatting. Previously the only hints available were restricted to “Implement Abstract Functions” and “Fix Imports”. However hints have been extended to include “Add Class XX” and “Add Function XX”. It is strange to see no options for setting up hints for JavaFX despite additional hints becoming available. You can now see all tasks for JavaFX in the Tasks window (eg TODOs). Additional items are available in the Palette, which cover some of the new items in JavaFX 1.3 (including the controls). Of note is the quicker build performance when doing a build/run of a JavaFX project.

Formatting of JavaFX Script code still requires a bit of work before NB 6.9 is released. For instance I found that the formatting of string literals would cause a huge number of blank lines to be inserted. Although it does not prevent a compile it is a huge nuisance that shouldn't be there in the first place. Another issue with formatting is the fact that braces for object literals are placed on a new line half indented, even though I have set the braces to just be on a new line. Additional formatting options are now available in the Options window for JavaFX.

In terms of the biggest changes most of them are found in JavaFX Composer. Once again the build performance is quicker. One can really notice the difference after making a simple change such as readjusting the size of a control on a Scene. The palette now includes the new items in JavaFX 1.3 (especially the new controls). With the Properties window there is a convenient button which allows one to quickly toggle the display of a category via a popup menu. This is very handy when you are not using a wide screen display. There is now concrete specifications for the JavaFX Composer QL (Query Language), which is used for filtering data sources.

JavaFX Composer is much more responsive compared to the previous version in NB 6.8, and properly outlines the contents of a design file (inside the Navigator window) in Design mode after exiting Source mode. Certain controls now have a corresponding customize button in the Properties window to customise them like one of the Composer templates. All data sources now have a “Raw Data” tab so you can see any data before it is filtered. In the design pane guidelines now appear when placing a control inside a Container (layout). Unfortunately there is still no support for handling custom JavaFX controls/nodes. Hopefully this will be remedied in a maintenance release.

With so many new changes in JavaFX Composer I have only covered some of the significant ones. All other changes can be found on the NB Wiki. Additional new features to note with NB which apply are basic refactoring options for CSS files, quick access to make simple changes to an Ant build (via double yellow arrow button), and build server support (with Hudson).

As you can see Oracle have certainly not stood still with the JavaFX tooling. Further adding to this is the fact that they are collaborating closer with Inkscape in realising that this vector graphics tool is commonly being used amongst JavaFX developers. One can hope that Oracle will establish closer ties with other open source tool vendors in the future. Tooling for JavaFX is certainly in a much better state than it was over 6 months ago.

13 April 2010

Use Of JavaFX Script

JavaFX Script is currently being used in interesting places and is enjoying increased uptake. One indication of this is the TIOBE Index which provides a rough indication of programming language trends. It is a great place to visit to see what programming languages should be looked at. Currently JavaFX Script is at position 22 on the index. I would expect JavaFX Script to reach the top 20 next month which is a realistic view provided the growth considerably increases from its present rate.

Among the most interesting uses of JavaFX Script is as a DSL for JSF, which is currently being developed by Exadel. Although it is in the early stages some people may see it as viable option when its first version is completed. Some people find using a markup language to be highly inflexible and cumbersome when creating a front end application, so there is room for JavaFX Script to handle that area.

Recently there was an article published on Java Lobby on using JavaFX Script to develop a basic NetBeans platform application. Personally I see this as a major area when JavaFX Script can enjoy a good rate of adoption provided there is a good level of support. It isn't a surprise to see this happening since there is a considerable interest in using JavaFX Script as an alternative to Java for creating NB platform applications. One can expect this to further increase as time goes on.

Oracle should take note that JavaFX Script requires a significant level of development in order to stay relevant. Dropping support for the language would be a huge mistake that would greatly set back JavaFX. Oracle may not fully realise the potential that JavaFX Script has with being able to unify front end development across different hardware platforms (desktop, mobile, TV). Why cease development of a technology that is starting to see a reasonable amount of adoption?

If you are using JavaFX Script in an interesting way then please let me know through the comments. What needs to be known are the major use cases for JavaFX Script, which will make it easier to improve it for its target markets.