For the past four months, a team of engineers and designers at Gluon have been working on an application for JavaOne. This project makes use of Gluon Mobile and Gluon CloudLink, as well as a number of open source offerings (both our own and from the community). Leading in to JavaOne we wanted to introduce the application, talk a little about what it offers, and remind readers that we will be presenting a BOF to expand on this topic at JavaOne (see BOF3317: Building the Mobile JavaOne OTN App with JavaFX).
The Gluon JavaOne application is a cross-device application written in Java, comprising both client and backend development. The client application is available now from the Google Play Store and the Apple App Store. The project specification contained a lot of cool requirements:
- Activity feed for latest conference news
- Content / speaker catalogue
- Session voting
- Session note taking
- Exhibitor / Venue / Sponsor details
- ‘OTN Experiences’
- Push notifications
There is also a lot of platform-specific functionality that we use when the application is run on mobile devices, including:
- Push notifications
- Status Bar color
- Checking network connectivity availability
- File storage
- Settings storage
- Application life-cycle
- Native platform web browser
- Native platform phone dialer
In terms of code stats, at the time of writing this post, the following stats were retrieved from our internal systems:
- 1374 change sets in repo
- 500 Jira issues filed / resolved
- 25 user interface views in client app
- Lines of code:
- Client: 9103 lines (excluding comments / whitespace)
- Backend: 4339 lines (excluding comments / whitespace)
- CSS: 1078 lines
- FXML: 439 lines
The amazing thing about building applications using Gluon Mobile is that there is no enforcement of a particular idiom. The engineering team responsible for this project had developers using their preferred IDE (with NetBeans, Eclipse, and IntelliJ all used), running their preferred operating system (again, we had developers using Linux, Windows, and Mac OS X), and finally, our engineers were able to test on both their development machines (without the pain of simulators / emulators), and also on whatever devices they had lying around – Android or iOS, phone or tablet, they were all able to be used to test ‘on-device’.
The best part of all this though is that our developers were able to rapidly iterate, and test only on-device when they absolutely had to. This meant more time coding, and far less time waiting for compilation.
There is one other number that stands out above all else: zero. That’s the number of lines of platform-specific code we had to write in the application to handle all of the platform-specific functionality that we mentioned above. We didn’t write any platform-specific code for the user interface, and nor did we write platform-specific code for accessing native services.
To achieve this, we made extensive use of the Gluon Charm Down library (which ships as part of Gluon Mobile) to access native functionality in a platform-agnostic way. This means we never had to test for a particular platform, and do things differently based on that platform. We simply asked for a service, and asked that service to perform an operation. Again, our Charm Down API is a game changer – it enables native integration with the platform in a totally platform-agnostic way. Performance remains high, and developers never need to drop down to native code. Gluon Mobile does all of that behind the scenes.
The next release of Gluon Charm Down (as part of Gluon Mobile) will include many service APIs, including the following:
- Barcode scanning
- Bluetooth low-energy
- Life cycle
- Status bar
We will provide a lot more information regarding the new and improved Charm Down API after JavaOne. If you are unclear how Gluon Mobile works, there is now a page you can visit to get a high-level overview of the technology.
JavaOne App Backend
The Gluon JavaOne app uses Gluon Mobile to seamlessly connect to a Gluon CloudLink backend, running inside Oracle Cloud. This means that we get automatic and transparent bi-directional synchronization. For example, when an administrator uses the web backend to add an activity feed item, it is automatically synchronized into an ObservableList on the client, and because of the way JavaFX works, that is then automatically shown to the user. Similarly, when the user orders a coffee in the OTN Experiences section of the app, it is added to a list in the client, and this list is then automatically and transparently synchronized up to the JavaHub backend through Gluon CloudLink.
On the other side of Gluon CloudLink sits a number of services like the JavaHub Backend (for the OTN Experiences) and the Event Scheduler Service (to retrieve the sessions and speakers information). Gluon CloudLink essentially operates as a MBaaS (Mobile Backend as a service), and provides a front-end for the different services it is connected to via CloudLink Connectors. Our engineers and deployment team can then use the Gluon CloudLink Dashboard to configure the connectors and ensure that the service is operating efficiently, scales appropriately, etc.
Click the images for a larger version:
At JavaOne we have a small contingent from Gluon travelling to present on Gluon solutions. We have talks covering all aspects of the Gluon JavaOne application above. A quick summary of our presentations is below:
UGF6432: Java Mobile and Embedded Development with Gluon and NetBeans
Today it is possible to write Java applications and run them on iOS, Android, and embedded devices. This session shows how the flow between writing a Java application and deploying it on mobile and embedded devices is extremely easy with NetBeans and the Gluon plugin. After the session, you will be able to develop end-to-end applications, from mobile apps to enterprise middleware, all in Java.
CON3315: Welcome to the Next Level: Java 9 + Gluon + Mobile
The dream of JavaFX (and Java) was always about being cross-platform and cross-device, for all manner of devices. Java has succeeded here, but so far it has failed with building user interfaces in the same way. In recent years, JavaFX has made huge strides toward this dream, and with Gluon now developing commercial and open source offerings, developers are finally able to create rocking user interfaces in Java for Android, iOS, desktop, and embedded devices. This session shows how to use your existing ID, and how to accelerate development with open source tools such as Scene Builder and JavaFXPorts. You will leave feeling excited about the possibilities of “write once, run anywhere” becoming true for building mobile Java applications.
CON6466: Java on Mobile Devices
Java has long aspired to be fully mobile-friendly. It was first envisioned as a mobile programming language (remember Oak?). Now Java SE is alive and well on Android, iOS, and embedded platforms, giving you the full power of Java. And you can use your Java skills to create apps with exactly the same source code on desktop and mobile. This session updates you on the current state of Java on mobile. It covers the various options for the VM; building great-looking Java apps; and the range of Gluon products, services, and open source projects that enable developers to create compelling applications that can connect to enterprise back-end and cloud systems. It shows how your IDE is a great entry point for doing mobile development, with free plugins that automate and accelerate development.
BOF3317: Building the Mobile JavaOne/OTN App with JavaFX
Gluon is responsible for building the official JavaOne/OTN application this year. In building this application, it made use of a variety of open source and commercial products. This BOF walks you through the process Gluon used to build the JavaOne/OTN application, describing it in general terms that will enable you to feel capable of proceeding with your own mobile projects. After leaving this session, you should feel confident enough to start your own mobile development with standard Java SE technologies as well as Gluon Mobile to enable the creation of cross-device mobile applications for Android, iOS, desktop, and embedded.
CON4404: Extend Your Cloud/Back End to Mobile Devices
Companies are facing an increasing demand to make their services available via mobile applications and not only via websites suited for desktop usage. Although the development of a mobile app is often considered a standalone task that ultimately integrates with the company’s back-end infrastructure, it is often much better to integrate the app development into the enterprise architecture. This session explores the requirements for building mobile applications (for Android, iOS, and so on, using cross-device solutions such as Gluon Mobile) in relation to cloud connectivity, including persistence, cross-device synchronization, back-end cloud synchronization, and dealing with connectivity issues on platforms such as Oracle Cloud.
CON3302: Saturn on the Go: Deep-Space NASA Missions on Tablets with Gluon Mobile
Space mission operations-oriented customers such as NASA and the US Air Force find the latest Java client technology stack well suited for developing critical software ecosystems. These systems have custom computing and visualization requirements for which the Java services and client platforms are a cost-effective solution. New community toolkits such as the Gluon software suite extend existing Java client tools with custom visualizations to Android and iOS devices. This session discusses extending the Deep Space Trajectory Explorer, a complex tool used on NASA interplanetary design missions, to tablet devices. Live demonstrations of the application on both desktop and tablet form are provided.
As we’ve said a lot recently – we know we’ve been quiet recently, but we are starting to pull back the covers. We have a lot to show. We will talk about some things at JavaOne, but we have so much more to say.