Java desktop links of the week, July 23

Heaps of good links this week – enjoy!

  • Johan Vos announced that JavaFX 11 early access builds are now available in Maven Central, and the final release is on track for release in September (with JDK 11). This is really cool as we are getting to the point where JavaFX is decoupled from and able to progress at its own pace, separate from the JDK. There is a short how-to document up on the Gluon website.
  • Pedro DV continues to improve JMetro, adding support for TreeView, Tabs / TabPane, and context menu.
  • Gerrit Grunwald has two posts this week. Firstly an anchor selector control, and secondly, on rolling gradients.
  • Jordan Martinez has announced he is looking for someone to take over maintaining the RichTextFX (and related) projects, as he is moving onto other technologies and won’t have the time going forward. I hope someone steps up, as there is some really cool technology here and it would be a shame to see it abandoned.
  • Andres Almiray has two blog posts this week. Firstly about creating aggregate JavaFX bindings, and secondly about using Sass in JavaFX (something that I know Gluon does also with Gluon Mobile).
  • Dirk Lemmermann has another JavaFX tip, this time on masking / clipping / alpha channels.
  • Tristan Deloche has open sourced Lyrebird, a free, open-source, cross-platform twitter client.

Triggering Azure Functions with Java when a storage change occurs

Recently my azure-javadocs project has been running into trouble. This project is a simple one that uses Travis CI to clone a number of GitHub projects, generate an aggregate JavaDoc from all of them, and then uses the static hosting feature of GitHub to host that output. The problem is that for every build, all of the files in the static branch on GitHub are overwritten, and over time this has become exceedingly large. Travis CI was configured to run daily, and in the last six months or so of running this service, the .git directory in a fresh clone has grown to 4.18GB! This is clearly not going to end well 🙂

So, I set about rearchitecting this project, and now I’m using the free Visual Studio Team Services (VSTS) to do the bulk of the work, as well as Azure Functions to do a little bit of work at the end. Essentially, VSTS now acts as my git repository and build system. For every commit into the git repo, a build is triggered automatically (I commit infrequently – just whenever I want to enable / disable a project from the generated Javadoc – so VSTS is also set to run the build daily). The build steps are specified within the VSTS user interface, and run through the standard steps: clone all the external repos, run Maven tasks to install and generate javadoc. The build concludes by creating a zip file containing the javadoc output, and storing it in an ‘incoming’ container within my Azure storage account.

Now that I don’t want to host the JavaDoc within GitHub (because I don’t want to end up with a massive repo again), I make use of a new feature of Azure Storage, which is the built-in support for hosting static sites directly from a storage container (technically the feature is still in-preview, but it works well for me). All I need to do is place my static website (i.e. the JavaDoc output) into a special $web container that is created for me by Azure Storage when I enable the static sites support.

The cool part comes next: I’ve written an Azure Function (in Java, of course) that is set up to trigger on any files being added to the incoming container. When a file appears, Azure makes sure to call my function, where I can then do whatever I want. In my case, I use it as a chance to firstly empty the entire $web container, and then to unzip the new zip file into the $web container, before deleting the zip file. Once this is all done, the docs are available from (which, coincidentally, is another Azure Function written in Java). At present the API docs available here are just a subset of all available docs, but I plan to add the missing ones soon (pending some pull requests into various projects).

The code I wrote is below. The most notable aspect is the use of @BlobTrigger  to tell the function that I want to trigger on file changes in the ‘incoming’ container. The code is not overly complex, and mostly just deals with deleting all files and then unzipping all files, but I hope it is helpful for someone who is wanting to work out how to use Azure Functions to act as the glue between different services.

In the fullness of time it is unlikely I will need to even have this Azure Function code at all – VSTS will almost certainly have first class support for static site hosting baked into it any day now, but because static site hosting is currently a preview feature, I took it as a good opportunity to learn how to trigger an Azure Function on something different than an HTTP Trigger, and I’m publishing it here in case others run into any issues trying to achieve this for themselves.

Java desktop links of the week, July 16

Here are the latest links. Enjoy 🙂

Java desktop links of the week, July 8

It’s been a stupendously long time since the last ‘weekly’ roundup, and for that I apologise profusely! I’ve been caught up doing a heap of travelling, getting sick, more travelling, and then trying to fit some work around the edges. Not to mention, I’m also trying to contribute a chapter on JavaFX UI controls to an upcoming JavaFX book. The end result of all of this is excuses and inability to do everything I try to obligate myself to do. On the upside, I’m a Java Champion now – that’s pretty cool, right? 🙂

Whilst I’ve been away I have been doing my best to track the Java desktop landscape, and so I have a lot of links to share today. I will be brief as I am writing this on a Sunday morning 🙂

On becoming a Java Champion

Today it was announced that I had been nominated for, and accepted into, the Java Champions group over the past few months. I’m elated to have been nominated and accepted into this illustrious group, and I appreciate all those involved that were involved in forwarding this nomination.

What is a Java Champion? According to the website, Java Champions are:

an exclusive group of passionate Java technology and community leaders who are community-nominated and selected under a project sponsored by Oracle. Java Champions get the opportunity to provide feedback, ideas, and direction that will help Oracle grow the Java Platform. This interchange may be in the form of technical discussions and/or community-building activities with Oracle’s Java Development and Developer Program teams.

I’ve been involved in the Java community almost exclusively since university back at the turn of the century. I’ve been so fortunate to help guide Java at Sun Microsystems and Oracle as an engineer / technical lead on the OpenJDK project, and today I continue to push for Java as a cloud developer advocate at Microsoft.

Outside of my employment, I’ve been proactive in pushing Java too. I’ve been technical reviewer on numerous Java books (and I’m even contributing to an upcoming JavaFX book), a track lead for JavaOne and Oracle Code One conferences, a speaker at numerous conferences (including being voted a JavaOne Rockstar twice), a Dukes Choice award winner for ControlsFX, an active blogger of the Java desktop links of the week series, and so much more. Clearly, Java runs through my veins 🙂 .

For a really long time I wished I could be a Java Champion, but I was unable to become one because Oracle employees were ineligible, and for six months after leaving Oracle they were ineligible as well. Now that I’ve been out of Oracle long enough (just), I’m incredibly pleased to have been accepted into this group, and I look forward to representing the ideals of a Java Champion as best as I can.