21 August 2009

What Next For JavaFX?

After the current release of JavaFX (version 1.2) many people will be wondering where JavaFX will be heading next. Considering that Sun is remaining tight lipped at this stage on what to expect next with JavaFX I can only speculate on what could be included in the next release. Most of my information in terms of this speculation mainly comes from the JIRA bug tracking system and JavaFX team member blogs.

It is easy to understand why Sun is tight lipped on JavaFX development when you see what is new with Flex 4. For some reason there is no content being displayed with the referenced article, you may have better luck than I did. One cannot help but wonder if Adobe are obtaining the majority of their inspiration from JavaFX, it seems highly likely they did. Honestly I think that they have been intimidated by the recent success that JavaFX is currently enjoying, and are trying to bring some of that success to Flex. Flattery is the biggest form of imitation.

Based on what little information I have obtained so far this is what is most likely to appear in the next release of JavaFX (version 1.3, codename SoMa):

  • New graphics/rendering system (named Prism)
  • Basic 3D graphics APIs (from Prism)
  • Improved graphics performance (from Prism)
  • Use of GPU for graphics rendering (from Prism)
  • New 3D graphics system (based on OpenGL ES) that can be used on desktop, mobile, TV (from Prism)
  • Beta version of the highly impressive JavaFX Authoring tool (for Graphics Designers only - may be of use to Software Developers?)
The majority of improvements are in the area of graphics and performance like the previous release. After looking at the above list you are probably thinking that everything that is likely to be included comes from Prism. Just to give a quick background on Prism, it is a completely new graphics system built from the ground up to take advantage of the graphics hardware in the target machine. Prism was development around the same time that Scenario (the current graphics system for JavaFX) was being developed.

As you would expect with Prism using the graphics hardware (eg GPU) you should be seeing significantly better framerates, and less memory being used as a result. Currently many people are experiencing serious performance issues with the number of nodes being added to a scene (the biggest problem with Scenario). The more nodes that are added the slower the JavaFX application becomes, and the more memory that is used as a result. Eventually if one adds too many nodes this can result in the dreaded "out of memory error", sound familiar? Most of us that are developing applications using JavaFX can afford to wait for the next release, which does not have this issue since Prism is not affected by this.

It is a big if with the beta release of the JavaFX Authoring tool, but I would rather see a polished product as opposed to one that has clearly been rushed to the door too soon. Still it is highly beneficial to get the authoring tool released early for feedback so that it can become a high point of choosing JavaFX. After all we should aim to ensure that the authoring tool is the best designer tool around, PERIOD. It is time to target Flex Builder (based on the NetBeans GUI builder - Matisse) since we can do much better than what Adobe is currently doing.

03 August 2009

JavaFX 1.2 On Linux (Update)


Much to my surprise after performing some recent Ubuntu updates Java Web Start suddenly works again. I suspect it may be related to the GNU Java package, which was promptly uninstalled after experiencing problems compiling Java projects in NetBeans. By chance another attempt was made to run a JavaFX application through Web Start which worked perfectly without problems.

For those of you running JavaFX applications on Linux I would highly recommend you run them through Web Start. The reason for this recommendation is that the applet plugin for Firefox needs to become more robust. That is applets need to start without freezing the web browser, and more detailed feedback needs to be provided on the applet's loading progress (including the downloading of required resources). At least with Web Start you obtain a reasonably good level of feedback with the loading progress of an application, and if the application freezes then nothing else will be directly affected.

On the good news the Java Mobile 3 SDK is in the works for Linux. There is a screenshot of the SDK in action with one of the mobile emulators running via NetBeans. At the moment the JavaFX Authoring tool (for designers only) is currently in development. This tool will allow JavaFX applications to be designed visually (including the animations and bindings). It is a shame that the tool is not being targeted towards JavaFX developers since much of what was demoed at JavaOne 2009 is exactly what developers will be involved in doing daily. Certainly one would expect that the tool will be available on Linux since it is written in a mixture of Java and JavaFX. Details are currently sketchy on the tool but expect to hear more about the tool as soon as its released (as a stable version) at the same time JavaFX 2.0 (codename SoMa?) is released towards the end of this year.

I am predicting that if the JavaFX developers needs are met by the JavaFX authoring tool then they will be using it regularly. Not ideal unless there is a similar tool being released at exactly the same time for developers. In the worst case scenario the tool would need to satisfy the following developer requirements:

  1. Allow assets (resources) to be accessed and stored through local storage (eg hard disk, USB key)
  2. Generate fx source files for the view that are loosely coupled from the controller and model
  3. The generated fx source files for the view must be easily customised by the developer, but must be readable in the tool after being customized
  4. Be directly integrated with a set of usable mobile emulators that support all of the required JavaFX mobile APIs (including the set of APIs that make up the Mobile Services Architecture JSR)
  5. Have "Matisse" like visual layout (a real must for custom dynamic layout)
  6. Can easily add additional visual (and non visual) JavaFX controls to the control palette without writing any extra code just like in NetBeans
  7. Customized visual binding via scripting (through JavaFX script)
  8. Automate the tool through visual macros that can be customized at the code level (Scala is a possible candidate here)

If anyone has any ideas on what to include in the list please include it in the comments for this post.