Kotlin, JavaFX, and OpenJDK Is My Perfect Dev Baseline

Like many people I got into my software development stack rut; complaining about the things I hated about it and why I wanted to change. The Java stack had been treating me ever increasingly well, especially with the refactoring of Spring into what it is today, but the language itself and it’s stagnation bothered me and had me starting to gaze at .NET now that it’s open source. I am now officially done with that exploration and will be sticking with the JVM-based system for the time being. This is driven by three major things: Kotlin, JavaFX, and the fully open source nature of the pieces I use.

My wandering eye started with my displeasure with Java and it quickly locked back into focus with my experimentation with Kotlin. I’ve only used Kotlin on one project so far but what I have used has convinced me that it will be an ever increasingly popular language, especially for those of us that need to or want to try to stick with the JVM-based platforms. I can, and will, have a whole article on my favorite parts of Kotlin, but the best parts that I always go back to are: conciseness, handling of nullability, operator overloading, and extension methods. There are many many more things but the modern language features and feel of C# but with full Java interoperability lets me have my cake and eat it too.

Speaking of cake, although I haven’t written thick client applications in some time, my domain is really back end libraries, services, and analysis tools, the ability to do so hypothetically is important. Because it isn’t a world that I looked into much recently I had a very incorrect view of where things were. My view up until a couple weeks ago was this: Apple has awesome UIs but only for their devices based on their OS frameworks, Microsoft has awesome UIs with their WPF system but really only for Windows (and kinda sorta but not really for Mac), and Java has shitty UIs with their antique Swing framework. While I get a little nostalgia when I see a swing app, by god couldn’t we have some decent MVC or MVVM style construct like we have for Java? Turns out we already do: JavaFX. I had heard of JavaFX, I had seen demos of applications written in JavaFX, but I never explored the technology at all. Why would I? I wasn’t writing apps like that in Java and I was sort of sick of the platform anyway. Not only does JavaFX give you MVC style constructs, complete with style sheets, scripting languages, decoupling of the code and the layout thanks to FXML. It also has a huge variety of existing controls that I haven’t seen in other frameworks before like charting, really flexible grids and tree controls, and all of this uses hardware accelerated rendering. Yeah Swing sucks, but who would use it anyway? Plus you can do all your controller coding in Kotlin if you so choose, both directly or potentially with the TornadoFX wrapper. So I now have the ability to not only write JVM apps in a modern language but I can write thick client apps too.

All of this would be a big sell but if I had vendor lock in the whole thing would be a deal breaker. As much as I loved .NET when I was a regular developer back in the day, once I went to the open ecosystem that is Java-land it is really hard for me to look back at a proprietary vendor lock as a feasible solution for me. Again, that’s what made the .NET open source initiative so attractive to me. Nosing around I confirmed that not only is Kotlin open source and available in OpenJDK, but so is JavaFX (as is Spring etc.). I therefore can have a full open source stack cross platform development environment and deployment option that allows me to write everything from command line apps to back end services to thick client UIs in a modern language. Kotlin+JavaFX+OpenJDK checks all of the boxes and is therefore the clear winner for me moving forward.

Leave a Reply