- Andrew Kos
- Bill Burlein
- Bryan Williams
- Christian Vozar
- Jeff Brown
- John Kraus
- Joseph Mak
- Josh Durbin
- Mark Daugherty
- Matt Van Bergen
- Melissa Geoffrion
- Michael Kang
- Michael Chan
- Michael Hodgdon
- Mike Motherway
- Molly McDaniel
- Nadia Maciulis
- Pat McLoughlin
- Paul Michelotti
- Puru Hemnani
- Rohit Srinath
- Ryan Lunka
- Tom Kelly
All Blogs
CITYTECH Blogroll:
Book Review: Pro JavaFX Platform
Tuesday, August 4, 2009
Early adopters of new technology platforms seem to have a masochistic side in that they must put up with the pain of unimplemented features, poor or non-existent documentation, and incomplete APIs. Their reward for all of this hard effort and needless suffering once a new version of the platform is released is often hopelessly broken code and a relearning/unlearning of all that has changed.
JavaFX certainly played the role of dominatrix in my life for the past year. What started out as an interpreted language, moved to exclusively compiled and had keywords phase in and out of favor (I still type “attribute” in my weaker moments).
Through the seas of change though, Jim Weaver and his blog have helped to keep me afloat. So it makes sense that Jim, along with other vocal JavaFX community members in Weiqi Gao, Stephen Chin, and Dean Iverson, would be the ones to write the definitive guide to JavaFX (which would have been the perfect title, but it’s actually called “Pro JavaFX Platform, etc.” instead).
“Pro JavaFX” is a very well-written, detail-oriented, yet approachable read. While learning JavaFX over the past year, mostly from blogs, hearsay, and copious amounts of trial and error, I had a functional, yet “swiss-cheese” understanding of the language. I was effectively a Java programmer writing JavaFX code — but I wasn’t writing idiomatic JavaFX. I wasn’t a JavaFX programmer.
PJP answered nearly all of my questions by not only explaining language features and corner cases, but also usually the rationale and implications behind them as well. It made it easy to get excited about the language itself all over again.
For example, take this small code fragment taken from Chapter 7 which will return the number of cells for a given player in a Reversi game (but I don’t need to tell you that, because I think the code does a better job):
public bound function getScore(owner:Owner):Integer {
def cells = for (row in board, cell in row.cells where cell == owner) {
cell
}
return cells.size(); }
There’s a lot going on here that I like (but not necessarily news): the bound function makes for easy updating of state, and constructing a sequence from a “for” loop almost feels like cheating it’s so concise (I think that “return” is optional though).
What’s really great though, is JavaFX’s “nested” for loops. I find “for (row in board, coll in row.cells where cell == owner)” not only concise, but about as clear as if it were written out in English. “Pro JavaFX” is littered with these “idiomatic pearls of wisdom” that helped me realize how Java-centric my JavaFX code was.
The book is a good survey of JavaFX as it exists today (version 1.2). In addition to the language proper, it covers many of the third party libraries (JFXTras, et al.), has a chapter on building a professional RIA book store front type app, and finishes with a solid chapter on JavaFX Mobile.
While readable cover-to-cover, I’ve found it more valuable as a reference to pick and choose from as needed. For example, today I finally read up on mixins and the different forms of triggers.
I highly recommend this book to anyone interested in JavaFX. It will likely stay on my desk for some time to come.
Sten Anderson
Recent Posts
- Descriptive JMX Beans in AEM/CQ
- Invisible requirements within Business requirements
- Building a better Options Predicate
- Javascript, This, and You.
- Extensionless URLs with Adobe Experience Manager
- The Life of a Tester in Adobe CQ World!
- Limitations of the CQ Parsys Model and the Implementation of a Nested Paragraph System
- Google Analytics and AEM: No JavaScript? No Problem.
- Using Apache FOP to generate a PDF document based on a form submission data
- Configuring SAML in AEM 5.6