FX Experience Has Gone Read-Only

I've been maintaining FX Experience for a really long time now, and I love hearing from people who enjoy my weekly links roundup. One thing I've noticed recently is that maintaining two sites (FX Experience and JonathanGiles.net) takes more time than ideal, and splits the audience up. Therefore, FX Experience will become read-only for new blog posts, but weekly posts will continue to be published on JonathanGiles.net. If you follow @FXExperience on Twitter, I suggest you also follow @JonathanGiles. This is not the end - just a consolidation of my online presence to make my life a little easier!

tl;dr: Follow me on Twitter and check for the latest news on JonathanGiles.net.

I’m slowly trying to get more interviews up on this site, as I think it is really informative to learn what your peers are doing and thinking about a platform. The following interview is with Carl Dea (whom I’ll let introduce himself in a few lines). I know Carl from JavaOne 2009 where we shared a hotel room for the week, as we had both won tickets to the conference (this was slightly before I joined Sun), and we spent the time going between the various Java desktop sessions and meeting people we’d only previously known online. It was an incredibly fun time!

Also, before I begin the interview, I also wanted to quickly wanted to note that Carl was also interviewed by Nicolas Lorain for the Oracle Author Podcast (Direct MP3 download). With that done, here is the interview. Enjoy! 🙂


Hey Carl, would you please introduce yourself?
I am the co-author of the book Java 7 Recipes, author of JavaFX 2.0 Introduction by Example, and the technical reviewer of the recently released Pro JavaFX 2 A Definitive Guide to Rich Clients with Java Technology from Apress publishing. For my day job I am a Senior Software Engineer for BCT-LLC. By night I am a Java/JavaFX and Rich Client enthusiast who blogs at CarlFX.

You’ve been involved in the JavaFX world for a long time? What drew you into it?
I have been involved with JavaFX from the beginning when it was called F3 (Form Follows Function) created by Chris Oliver which eventually had been acquired by Sun Microsystems (now Oracle corp). What drew me into JavaFX was the fact that in the beginning JavaFX 1.x was a graphics language (DSL) capable of combining lower level graphics drawings, user interface controls, media, and animation capabilities with very little effort. At the time as a Java Swing developer I found that building a UI application was a pretty challenging task, so I resorted to using framework libraries to build well behaved UIs. To my surprise JavaFX 1.x seemed to be a natural step in moving Java on the desktop forward. So, I continued to boldly go where no Cobol developer has gone before.

Do you use JavaFX commercially, or is it more of a hobby for you?
We have plans to provide JavaFX as an a solution for some of our customers which currently have investments in Swing, Flex, HTML5, and RCP based technologies. It’s mainly a hobby for me where I enjoy blogging and tweeting about my adventures in JavaFX.

What do you think of JavaFX 2 now that it is Java-based?
At first I was a person who didn’t mind learning a new language (JavaFX 1.x Script language) and I wasn’t bothered (like others) that it was another language (not Java), but now it’s even better because all JVM languages can easily take advantage of JavaFX 2 bindings, thus allowing JVM languages to build DSLs letting everyone partake in the fun.

Do you program JavaFX using Java, or are you a fan of the various DSLs (most notably GroovyFX and ScalaFX)?
I am not a language geek, but I love learning dynamic and functional type languages. Being able to express things in less lines of code tells me that it is a ‘no brainer’. I’ve been fortunate enough to work on projects that use Groovy, Grails and Gradle so GroovyFX was a natural fit for me. I played around with Scala for sometime and hearing about Scala and JavaFX 2 through Stephen Chin and your talk called ‘JavaFX Your Way: Building JavaFX Applications with Alternative Languages‘ and Stephen’s blog entry called ‘JavaFX 2.0 and Scala, Like Milk and Cookies‘. In my opinion in many cases ScalaFX appears slightly more elegant when expressing things such as binding properties and making the fluent interface APIs seem quite English like. Very reminiscent of the earlier JavaFX 1.x Script language now called Visage. Some of the nice GroovyFX and ScalaFX concepts include: declarative syntax, lambda expressions (closures), operator overloading, duck typing, etc. JavaFX 2’s future looks brighter and brighter already!

You mentioned that prior to JavaFX you developed using Swing? What are your thoughts on JavaFX compared to Swing in terms of performance, functionality/features, and ease of development?
Maybe it’s better to say perceived performance. While Swing is using immediate mode rendering (pixel pushing) and JavaFX is retained mode (vector based), I find it depends on the kinds of applications people are developing. Making GUI applications very responsive to the user can be tough in any toolkit, but out of the box I feel hands down JavaFX 2.0 is the winner in many domains. I’m not sure if many people know that the JavaFX team has built things from the ground up by taking advantage of modern hardware such as hardware acceleration and multi-core processing. I can honestly say that for most UI development or a casual game I find JavaFX extremely capable for most of your application needs. I find JavaFX 2.x from a development standpoint that the APIs are very clean and easy to follow. For example when dealing with UI controls that need to render lists (rows) or tables (rows and columns) you most likely want your domain model to be in synch with your UI View. Not to put down Swing, but often the amount of complexity to wire things up can introduce more risk. In this scenario JavaFX again provides many of these facilities reducing complexity allowing you to focus on what you do best in order to rapidly develop applications that will will also look professional.

You just recently released a JavaFX 2 book, what made you want to write it?
I began by working with Josh Juneau, Mark Beaty, Freddie Guime, and John O’Conner (my co-authors) on the book ‘Java 7 Recipes’. I was slated to work on the client-side technologies such as Java2D, Swing and JavaFX 2.0. My editor (Jonathan Gennick) really liked the examples and felt it could stand on it own as a quick introduction to JavaFX 2.0 for Java developers to hit the ground running. When working on Java 7 Recipes my main intent was to not only show some of the new features in Java 7, but to really help Java 2D/Swing developers migrate UIs and metaphors to the new JavaFX 2.x platform APIs. I created lots of the 2D and Swing examples that are similar to the JavaFX chapters for very good reason. The idea was to not throw away your old skills or conventions (patterns) but to reuse them with the new and exciting graphics platform JavaFX 2.

As you were writing the book, clearly you had to get very familiar with JavaFX. What is your favourite API or feature in JavaFX 2?
My favorite APIs are: Animation, WebView, and Media and UI controls:

Animation – I love watching things move
WebView – Ability to render HTML5 content
Media – Audio and Video
UI Controls – I love cool shiny controls

What are some of the ‘gotchas’ that trip you up in JavaFX? What would you have done differently?
I can’t really say there are any real gotchas except that anytime a toolkit or language that shields the user of the API’s perspective from having to do any of the hard stuff will inevitably run into resource issues. I believe one should still learn how things are actually working under the hood (keeping the source code to OpenJFX handy). For example the binding API is very easy use in order to synchronize values, but can often incur performance issues if used improperly. In large form type applications it’s important to learn to apply the proper binding strategy against your domain model and knowing how to cleanup after yourself. Unbind is your friend.

What are you really wanting to see in future releases of JavaFX?
The best deployment story Java/JavaFX has ever seen in all browsers (less dialog boxes). UI Testing tools (Note from Jonathan: Check out JemmyFX). More CSS selectors and behaviors, More media codecs (or the major native ones). Physics library. Touch gestures API, More controls!

Thanks for taking the time to chat with me. Do you have anything else you’d like to say to the readers?
If you are a UI developer or Java developer wanting to hit the ground running with JavaFX 2.x I encourage you to get my book at your favorite bookstore and those who want a deeper dive into the toolkit I highly recommend Pro JavaFX 2 A Definitive Guide to Rich Clients with Java Technology by James Weaver, Weiqi Gao, Stephen Chin, Dean Iverson, and Johan Vos. Lastly, if you are still using Java 2D and Swing based APIs (or you also want to see the new stuff in Java 7 sdk) you definitely should check out Java 7 Recipes by Josh Juneau, Carl Dea, Freddy Guime, and John O’Conner to help you make the transition.

Thanks Jonathan. It was a pleasure talking with you.