Why We Chose JavaFX for Vero Designer

Right before Thanksgiving holiday in 2013, I was approached by Ajo, Vero Analytics’ founder with a brilliant idea to create a self service analytics tool for business analysts. After several sessions of intense discussion, an inevitable question was raised — What technology should we use to build this awesome tool? At first glance, the decision seems like a no-brainer — An HTML5 web application! During the last decade, desktop application seems to be fading away and felt like a dinosaur. Who wants a native application? However, couple core requirements of Vero Designer rendered a web solution less ideal.

  • Need to retrieve, process, and render gigabytes of data in real time.
  • Targeted at business analysts and need to be installed on premise with zero configuration, zero IT involvement and no administrative privileges required.
  • Need to connect to client’s internal databases directly.

At the time, I just came off a small project, where I built a network management system by using JavaFX 2.0. Its well defined API, rich set of UI widgets, and out of the box native installer for both Windows and Mac OS X fit our bill quite well.

What’s Good About JavaFX

As a developer, I generally believe that there is no single technology or language that cover all problems you try to solve. A right solution is more of a balanced solution and totally depend on the situation you were in. Here are couple positive features, which make JavaFX shine for our needs.

It is JAVA!

Ok, I have to admit, that I might be a little bias on this one. As a long time Java developer started with JDK 1.1 when Eclipse was still in its infancy and entire Java project was built by a makefile, Java just naturally become my second native language. Inarguably Java is a mature and well supported programming language and it will stay that way for the foreseeable future. Sources of support and talent are abundant. It is relatively easier for a Java developer to quickly pick up JavaFX if you had some experience with Java Swing. Also strong IDE support, such as Eclipse, NetBeans, IntelliJ, makes development in Java a breeze.

Easy to Enforce MVC Pattern with Scene Builder

If you were building UI, MVC is the de facto standard pattern to follow. However, a lot of time it is easier said than done. I have seen so many UI projects ended up with Spaghetti code mixed business logic with view all over the places. With Scene Builder and FXML, JavaFX cleanly separated view from logic. Also coupled with CSS, Scene Builder provides the same experience as building a web page in HTML.

JavaFX is Living Well with Web Technology

As I mentioned before, a right solution is a balanced solution. There are lots of cases, a Web technology will do a better. No worries, JavaFX WebView comes to rescue, built on standard WebKit and provides closest experience as a real web browser. All the mechanism to facilitate the communication between JavaScript and JavaFX makes integration of the two technologies seamless. Vero Designer heavily uses D3JS library to render its core knowledge graph.

Out of Box Solution to Build native Installer

The major deployment issue with all Java applications was installing right JVM on user’s computer. Fortunately, JavaFX comes with the tool to build both Windows and Mac OS X installer bundle with Java Runtime Environment. In my opinion, this is one of the biggest advantage of JavaFX, it greatly improved its usability and user adoption rate. Especially since we are targeting at business users.

What’s Bad About JavaFX

Of course, nothing is perfect. JavaFX also has some drawbacks we encountered during our development.

  • JavaFX is still relatively new and not much documentations, samples, and supports available comparing to other Web technologies.
  • Lack of some standard widgets, such as calendar and dialog, etc. But this all fixed in JavaFX 8.
  • Animation support is not complete, most widgets do not have built in animation support, such as simple fade in and fade out.

In the end, I really enjoy working with JavaFX and seeing the community is growing everyday. In the next few month, I will share our experience and lessons learned from developing Vero Designer.