Imperative by day and functional by night

The JavaFX Effect

Embracing change is the best thing for a programmer.

For a long time now I’ve been programming in Java only and pretty much nothing else. Professionally I’ve been working in the J2EE/Java EE space building web applications and server side business components. In my own time I’ve been using Swing and Java Web Start to build and deliver desktop applications. I have dedicated most of my programming life to learning and keeping up with Java and have been rather reluctant to learn anything else. There is plenty to learn about Java programming as it is, let alone all other programming languages.

With my current Java skill set I can build thin client web applications and rich client desktop applications. But what I really want to do is build rich interactive internet applications and build them very easily. Building them as web applications though has never been easy and is still not easy today. How do you build rich and interactive desktop-like functionality into a thin web client? The new legacy way of doing it involves using JavaScript and AJAX. Servlets, JSP’s, HTML, JavaScript, AJAX, and XML can all be used to create relatively rich web applications. Using them all together to build interactively rich and sophisticated web applications targeting multiple browsers is often very difficult and painful. I always feel like I’m hacking instead of programming when I’m forced to have to develop ‘workaround solutions’ to simple and annoying problems that existing and new web frameworks should have solved already.

The current JavaFX innovation has really got me interested. The JavaFX language is a declarative scripting language and a statically typed programming language combined. Declarative scripting means that you can declare what you want in your program without having to write procedural code to tell it what to do. It has a scripting engine that can load the declarations and then know what to do and how to do it for you. Static typing means that all declared variables are bound to one type and one type only. It also means that packages, classes, inheritance, encapsulation, and reuse are all supported too. Impressive language features and conventional Swing widgets make JavaFX very ideal for rich GUI development, especially for the seasoned Swing developer. JavaFX was built with Java integration and high performance in mind and currently comes in two flavours; JavaFX Script for rich media applications and JavaFX Mobile for mobile devices.

Actually, (as picked up in the discussion comments)

JavaFX Script can run on multiple JVM devices including mobiles, whereas JavaFX Mobile is a streamlined JavaFX platform for mobile devices.

JavaFX has introduced me to the world of declarative scripting and has opened my mind to a new and interesting way of programming and thinking. As a die hard Java programmer, it is exactly what I need right now to get into some next generation Java programming. I am looking forward to learning it and tracking it’s success and progress. Check out the JavaFX language and the OpenJFX project for yourself (if you haven’t done so already) and see if you are interested too.


Written by warpedjavaguy

August 31, 2007 at 1:06 am

Posted in java, programming

Tagged with

4 Responses

Subscribe to comments with RSS.

  1. JavaFX script is for developing applications. These applications will run on a JavaFX mobile device.


    August 31, 2007 at 7:18 am

  2. Yes you are right, JavaFX Script does run on multiple devices including mobiles too. So JavaFX Mobile is actually a streamlined JavaFX platform for mobile devices. I like that 🙂

    btw, I recently found a great introductory JavaFX article here.


    August 31, 2007 at 9:18 am

  3. JavaFX is proving to be a very effective way to write desktop GUI applications as well. The marketing folks have completely missed an opportunity to highlight this fact as they pitch themselves into the RIA wars. In point of fact, JavaFX Script is a wonderful alternative to traditional Swing development, because of its seamless application of multithreaded listeners and at-the-point-of-concern trigger resolution for dynamic data model feedback in interactive GUI’s.

    The language is compact and has a rich expressiveness with a minimum of verbosity. It also interfaces well with your existing Java code base, so you don’t have to reinvent everything. It still has a way to go to really mature, but I am already making great strides in creating a distributed Swing app for real-world use on multiple platforms.

    The RIA hypesters can animate all the jumping poodles they want. I find that the real value of JavaFX is as a highly productive ‘glue’ for composing Java models into a synergistic whole.


    September 1, 2007 at 2:30 am

  4. I am discovering that too and am going to start converting some of my existing Swing applications. I’m really keen to see how easy it will be to integrate existing Java models with JavaFX.

    It’s good to hear that your experience has been positive.


    September 1, 2007 at 9:00 am

Comments are closed.

%d bloggers like this: