days
1
0
hours
1
5
minutes
5
2
seconds
1
9
Interview with Manuel Mauky

JavaFX vs Swing vs HTML5: Where does JavaFX stand in relation to other UI toolkits?

Manuel Mauky

Manuel Mauky

The fact that JavaFX is more than one of nature’s vagaries was portrayed in our article series “20 JavaFX real-world applications”. However, one question lingers: Where does it stand in relation to other competitive approaches? We asked JAX speaker Manuel Mauky (Saxonia Systems) for a statement.

JAXenter: UI development has entered the next phase with JavaFX. Where would you place it now? Would you recommend it for prolific deployment?

Manuel Mauky: I believe that JavaFX is, with version 8 and subsequent updates, ready for commercial use and is already part of many real-world applications. We have not regretted the decision to involve this technology into the project I am currently working on.

Some points could be improved and other features are still missing; therefore, the specific requirements must always be evaluated before making a recommendation.

JAXenter: How would you rate JavaFX compared to other Java UI toolkits, such as Swing or SWT?

Manuel Mauky: I have briefly worked with Swing and even less with SWT, so I can’t say that my personal experience helps me concoct an accurate comparison. My impression is, nonetheless, that JavaFX makes things easier to implement with less code. In addition to modern features such as declarative UI description through FXML, styling with CSS and simple animations, data binding is a personal highlight, which i.a. enables reactive programming (read also: Einfach und effizient: Reactive Programming mit JavaFX). It’s not as easy with other toolkits, as far as I know.

Future proof is one of the concerns when choosing a toolkit. JavaFX is, through Oracle support, certainly well positioned.

Read also: How JavaFX will outlive HTML5 and co.

JAXenter: Some representatives of the web faction say that Java is not a suitable technology for frontend development – especially in times of HTML5. Adam Bien retaliated in an interview by saying that JavaFX is more stable than HTML5. Who would win in a battle between JavaFX or HTML5?

Manuel Mauky: Actually I can’t really comprehend the fight. Personally, I’m mainly preoccupied with JavaFX, but am also very interested in web trends and like to be inspired – this is how my JAX talk came into being.

HTML5 is certainly a good choice in many cases, but there are and will continue to be circumstances where classic desktop applications make more sense. And for that, JavaFX is surely a good option.

I can also agree with Adam Bien’s argument. If you want to develop a business application that works and can be maintained for years, there are better choices than a short-lived JavaScript framework.

JAXenter: You’re going to introduce the Flux architecture at JAX. What’s that?

Manuel Mauky: The Flux archtecture can be seen as a variant of the MVC  pattern. It’s about building and structuring GUI applications.

The central idea is the restriction to unidirectional data flow: data “flows” only from the so-called “Store” to the UI, but not the other way round. User interactions are instead explained through the command pattern. Stores are able to decide for themselves if they want to react to certain commands and change their status, which would result in an UI update.

Read also: 20 JavaFX real-world applications

JAXenter: Flux is typically implemented in JavaScript. Why should Java developers be interested in it?

Manuel Mauky: Java, as language and environment, has obviously other characteristics than JavaScript in browsers, which is why not everything can be applied 1:1. However, the principle behind Flux is not limited to JavaScript, and features plus advantages such as precise data flow, are equally tempting for Java developers. Furthermore, the basic model goes better with the idea of functional programming than others do, which is another interesting fact for several developers. Finally, even if you do not adapt everything, seeing the bigger picture can be pretty educational.

JAXenter: Flux with JavaFX – how does this work?

Manuel Mauky: With React.js (wherefore Flux was originally developed), conceptually every Store alteration will redraw the whole interface, thus enabling a very easy programming pattern. It’s not so easy in JavaFX. However, we can use data binding and reactive streams to create a similar effect.

JAXenter: Thank you for your insight!

Author
Manuel Mauky
Manuel Mauky works as software-developer at Saxonia Systems AG in Görlitz since 2010. He’s especially active in frontend-domains, but for quite some time busy with JavaFX. In addition, he’s interested in topics like software-architecture plus functional as reactive programming. Manuel is founding member and chairman of the Java User Group Görlitz.

Comments
comments powered by Disqus