Many of the younger readers of this blog haven't heard of the legendary comedy team Martin and Lewis (Dean Martin and Jerry Lewis). The late singer/actor Dean Martin was the straight man of the team, and comedian/actor Jerry Lewis was the comedic foil. Each of the pair were incredibly talented, but when playing off of each other the audience routinely doubled over in laughter.
Although I'm not going to compare Martin Gunnarsson and Pär Sikö to Martin and Lewis (the latter never wrote code), Martin and Pär are incredibly funny when playing off of each other during their technical presentations. Each has won the coveted JavaOne Rockstar award, and it is a real treat to attend their presentations.
This year at JavaOne 2012, Martin and Pär will deliver a conference session entitled JavaFX Mashups. This session is scheduled on Tuesday, Oct 2 from 1p-2p in the Hilton San Francisco, and has the following description:
"A mix of content or functionality from two or more Web-based services has become known as a mashup. This presentation takes the mashup concept one step further by mixing Web content and scripts with a JavaFX program, effectively blurring the line between Web and application. This is made possible by the powerful WebView component of JavaFX. The session shows how to display Web content in a JavaFX application and how to set up two-way communications between the Java code and JavaScript code run in WebView. It includes several cool and creative examples based on this technique."
I'm really looking forward to attending this presentation in which Martin and Pär will entertain and enlighten us about how JavaFX and Web content play together well. If you haven't yet registered for JavaOne 2012, you can do so here! Hope to see you at JavaOne.
"We dance round in a ring and suppose, but the secret sits in the middle and knows." - Robert Frost
The current state, and future plans, for JDK 8 seem to be well-kept secrets, so I'm writing this post to shed some light on the subject.
Well-kept "secret" #1:
The schedule for upcoming features in JDK 8 builds is posted, listed by feature and by milestone. These lists are available from the JDK 8 page on the OpenJDK site.
Well-kept "secret" #2:
Significant progress has been made in Project Jigsaw, and active development continues. You can see working documents, a quick start guide, and sign up for the mailing list at the preceding link. You can also download an early access version of JDK 8 with Project Jigsaw to try it out.
Well-kept "secret" #3:
You can play with lambda expressions (closures and related features) now, using them, for example, in JavaFX event handlers. Check out the Project Lambda page on the OpenJDK site for very detailed documentation and early access downloads.
Have fun learning about, and playing with, these upcoming JDK features!
The title of this blog post is a Haiku that also has some poetic justice. In September 1992 the programming language named Oak that James Gosling created was first demonstrated on a PDA device named Star7. This device had a graphical interface and a smart agent called "Duke" to assist the user. The Oak programming language, named after the Oak tree outside of Gosling's window, was designed to be a new technology for programming next generation smart appliances.
Oak was subsequently renamed to Java, which went on to become a nearly ubiquitous language and runtime platform. Exactly twenty years after the first demonstration of Oak, tremendous focus and momentum is occuring in the Java embedded space. For example:
JDK 7u6, released a couple of days ago, contains a general-purpose port of the JDK to Linux ARM, making it available under the same licensing terms as Oracle Java for other platforms. This JDK release is aimed at the emerging ARM server market, and for the community working on development boards such as the BeagleBoard, PandaBoard and the Raspberry Pi. This port provides 32-bit binary for ARMv6 and v7, with full support for Swing/AWT, both client (C1) and server (C2) compilers and runs on most Linux distributions. Support for JavaFX on ARM is planned for an upcoming JDK release.
A new conference named Java Embedded @ JavaOne will provide business and technical decision makers, as well as Java embedded ecosystem partners, with a unique opportunity to meet together and learn about how they can use Java embedded technologies to enable new business strategies. This conference will occur during JavaOne 2012, and can be attended as a standalone conference, or as an add-on to the JavaOne conference. Learn more about the business session line-up.
One aspect of embedded Java that excites me is the ability to use a common language and UI toolkit to develop applications for devices, thereby drastically reducing the development and maintenance costs.
Java Embedded @ JavaOne promises to be a very exciting and useful conference, so I hope to see you there!
Note to reader: This "guest post" was written by Dr. James Thompson, who is using JavaFX to develop scientific applications. I've included a brief bio for Dr. Thompson after this post.
Java has a rich history in the scientific community. Applications and frameworks such as the NIH's ImageJ, CERN's Colt framework and Apache Commons Math library immediately spring to mind when working in scientific computing. My first exposure to Java in science came as a graduate student at Oxford. We needed to analyze many large noisy datasets, typically stacked (multi-page) TIFF image files. ImageJ and its excellent plugin framework was the environment of choice for this work. Other groups such as the Mosaic group at the ETH in Switzerland did similar work and have extended it beyond what we did a few years ago.
So where does JavaFX 2 come in? Well, in my recent work we've had a need to develop image analysis software yet again. It turns out this is a common theme in biology, physics and engineering labs nowadays. I decided to have a look into what was available on the JVM which was when I learned of the new Java FX 2 pure Java library. It instantly appealed as it was well documented, had plenty of examples and was free! Scientists are a diverse group too, so the ability to write once and run on Macs, Windows and Linux boxes is a massive bonus. In academic science these days you often find diverse backgrounds and amalgamations of people with broadly different skill-sets. A nice user interface, easy installation and pleasant work environment on the computer desktop is therefore imperative.
A few features stood out immediately as I began browsing examples and reading the API. These included in my order of priority: extensive graphing tools, ObservableList, easy integration with native file systems (open / save dialogs), a simple syntax, great API documentation, FXML and good Netbeans tooling. Later on Scene Builder came onto the scene (pardon the terrible pun). Having done some work with XCode for Cocoa on the Mac I thought it would be hard to stand up to it. I was wrong. Scene Builder was mature out of the box. Laying out 'AnchorPanes' or anything else for that matter is very straightforward. CSS integration also enables easy skinning for apps. This is generally much more difficult in other frameworks.
Living on the JVM and being pure Java, integration with other JVM languages is easy too. My recent forays into Scala have proven very fruitful with JavaFX. I've been building some fairly involved numerical analysis code, and it's very easy to code in Scala. I've been able to use JavaFX in pure Scala classes, extending the 'Initializable' interface and load FXML classes easily.
I've had to develop a few things building directly on the JavaFX framework, such as for example tools to load multi-page TIFF files and write various bit-depth TIFF data to JavaFX 'Image' objects. But generally plotting tools and data handling are a breeze with JavaFX 2.
IntelliJ IDEA, Netbeans and Simple Build Tool for Scala all enable mixed projects and help with building greatly. I stumbled across an sbt-javafx plugin a few days ago, which has enabled me to package my projects for distribution among my colleagues.
In short, if you have a need to develop applets for scientific work, need to load and save data with a GUI, plot graphs and get actual science done, JavaFX 2 has to be given some serious consideration! I can't imagine trying to do what I've been able to in any other framework. I hope more scientists decide to develop things with JavaFX 2, so that we can extend the body of open source code and make development even easier.
Please have a look at a couple of movies I made showing my GUIs in action. These projects are a work in progress, but demonstrate the power of JavaFX and its application to scientific computing front ends.
James did his PhD at Oxford in the Physical and Theoretical Chemistry Laboratory, researching membrane protein biophysics. After finishing, James went to Harvard Medical School for a year to work on an imaging project before moving to his present role as a post-doc at USC in Los Angeles this year. His work revolves around biophysics but uses techniques from molecular biology, chemistry, microscopy and computer science. James maintains interests in single molecule biophysics, membranes, imaging, protein structure and function and computation with Java, Scala and GPUs. His twitter handle is: drJamesThompson
Just wanted to let you know that Part Two of the Using Properties and Bindings in JavaFX 2 article that I wrote for Java Magazine is now available. It is written in tutorial-style, and contains a download that has exercise/solution code.
I hope that you'll find this article helpful in continuing to learn about JavaFX 2 properties and bindings!
You may have used the JavaFX Scene Builder tool to create the user interface for a JavaFX application. The underlying data format for the UI that you create with Scene Builder is an XML dialect named FXML. Here's an article that I wrote for Oracle Technology Network to help you understand FXML.
By the way, the REST communcation in the example program uses REST/FX. As a heads-up, DataFX is becoming a de-facto standard that you might check out as well for data communication from a JavaFX application.
You may already know that the goal of the open source JFXtras Project is to provide pieces that developers often need in their day-to-day work, but that are currently missing from JavaFX 2. There is an application named JFXtras Ensemble that demos those pieces (currently some Controls and Gauges) available in the JFXtras Project. To install and run the app, visit jfxtras.org and click the appropriate native installer link in the Try It! section.
Congratulations and thanks to the contributors to the JFXtras Project, namely Stephen Chin, Dean Iverson, Tom Eugelink, Gerrit Grunwald, Thomas Bolz and Jonathan Giles. Please consider joining the JFXtras Project and helping us create additional useful pieces for JavaFX 2 application development!
I recently had the privilege and pleasure of traveling throughout the ASEAN region speaking at Oracle Technical Network "Developer Days" events. The five cities in the tour were Manila, Kuala Lumpur, Jakarta, Singapore, and Bangkok. My tour guide and traveling buddy was Naveen Asrani (see picture on the right), a Director of Product Management at Oracle who lives next door to the region in Bangalore.
One of the things that struck me on the tour was how warm and engaging people (including the Java developers) are in the ASEAN region. The attendees in each location had high levels of professionalism and lots of great questions. It was also great to meet developers that I had previously only communicated with electronically. One such developer was Mark Anro Silva in Manila, pictured in the top slide in the deck below. Mark is a JavaFX pioneer from the early days of JavaFX Script, and shares his work via his blog.
I found it amusing, by the way, that Lady Gaga was on tour in the same region. After checking into the Makati Shangri-La hotel in Manila, I turned on the TV and found that Gaga had checked in that morning. I had no idea that she was into Java/JavaFX! :-)
Take a look at the great audiences and a couple of the sights that I had the privilege of seeing, in the slide deck below:
I want to make you aware of a two-part series that I wrote for the Oracle Technical Network entitled Best Practices for JavaFX 2 Enterprise Applications. These newly-published articles focus on using best practices for developing enterprise applications in JavaFX 2. A great companion-read to these articles is the blog post entitled JavaFX:The 10,000 Foot View written by Richard Bair, as it continues to shed light on the future of JavaFX application deployment (e.g. via native application bundles).
Just a quick note that Part One of the Using Properties and Bindings in JavaFX 2 article that I wrote for Java Magazine is now available. It is written in tutorial-style, and contains a download that has exercise/solution code. Here's a video that introduces the article:
I hope that you'll find this article helpful in learning about JavaFX 2 properties and bindings!
Recent Comments