Tag Archives: BikingFX

GETTING STARTED WITH JAVAFX 8: DEVELOPING A REST CLIENT APPLICATION FROM SCRATCH


GETTING STARTED WITH JAVAFX 8: DEVELOPING A REST CLIENT APPLICATION FROM SCRATCH

It was was mid 2013 when i first tried to run the JavaFX samples under OS X, in fact, there’s still a draft post around here in which i wanted to describe the steps necessary to run that stuff with ant and how to use Maven to build an app.

Well back then i played around a little with JavaFX 2.1 but all that fiddling around including jfxrt.jar and such wasn’t much fun.

1,5 years forward i’m sitting in various conference rooms in San Francisco, enjoying JavaOne 2014 sessions.

I’ve seen two interesting JavaFX 3D sessions with respectively bye Sean Phillips and especially inspiring “Swing Away! Move to JavaFX 8 and the NetBeans Platform” by Gail and Paul Anderson.

My personal background: I’ve been creating Java Swing applications since 2004 now and we have one very graphic heavy GIS application and also many form based stuff, so there’s some background developing Java client applications.

I got myself Pro JavaFX 8 by Johan Vos, Weiqi Gao, Stephen Chin, Dean Iverson and James Weaver as well as Javafx Rich Client Programming on the Netbeans Platform by the Andersons, the later one didn’t arive in time for my experiments, so review here.

So give something to code. Why not reusing the topic from my series of posts Developing a web application with Spring Boot, AngularJS and Java 8, which had gotten quite some attention of the last months.

The app is build around a REST api that is currently used by an AngularJS frontend for the webpage.

My goal was to create a client application that:

  • Displays all biking pictures, shuffles and flips them
  • Displays all bikes and makes them editable
  • Displays all gallery pictures (and in the future, also allows to upload some)

That gave me the following topics: Getting and processing JSON (i could have used Jackson again, but i decided for JSR 353), creating a basic JavaFX layouts using Scene Builder and connecting it to stuff, loading other stuff in the background so that the GUI won’t block, show progress.

The code for the this app named “BikingFX” is on github: github.com/michael-simons/bikingFX.

That is what it looks like: