Dustin's Pages

Saturday, February 18, 2012

Questions at My RMOUG Training Days 2012 Presentation on JavaFX 2

I presented "JavaFX 2.0: Java in the Rich Internet Application Space" at RMOUG Training Days 2012 earlier this week. After many years of presenting at technical conferences, I've decided that one of the best indicators of how well I did in my presentation is the types of questions I get from attendees. If I get no questions, it is more likely that I've confused, lost, or bored people than that I covered all possible questions. If I get really basic questions asking about things I already covered, it means I either messed that part of the presentation up or that I simply forgot to cover that thoroughly. When I get relevant questions that seem to pick up where my presentation left off or that demonstrate the attendee asking a question to apply what I've presented to an individual situation, I know that I've been able to provide what I had hoped to provide. The questions from attendees at my presentation this week fell into that last category. They were excellent questions.

In this post, I repeat (paraphrase) the questions (thanks Bill for recording them!) I was asked and provide answers to those questions. In most cases, I answer here pretty much the same way that I answered at the presentation (but with links here). One exception is my answer to the question about JavaFX 3D support, which has much more information provided in the answer in this post than I could provide at the presentation.

Q: What does JavaFX have for layout managers related to Swing and CSS?

One of the points I made in my presentation is that JavaFX 2 does a nice job of supporting industry standards such as Scalable Vector Graphics (SVG) and Cascading Style Sheets (CSS). An insightful attendee asked the question of whether JavaFX 2 uses Swing-like layout managers for layout or uses CSS for layout. My answer was that I had mostly seen (and had only used) JavaFX 2's layout panes for layout and I described these as akin to Swing's layout managers. I added that I have typically seen CSS used in JavaFX 2 applications for styling elements more than for layout purposes. CSS can be used to style many elements of the scene graph including nodes and even layouts. CSS can affect the layout panes by styling things such as padding and borders.

With hindsight, I probably should have addressed JavaFX in context of database access at a conference that is heavily oriented to the Oracle Database. I suggested that because JavaFX is now "pure Java," it can easily be used with JDBC, favorite Java ORM tools (including JPA implementations), or other database-access goodies in alternative JVM languages such as Groovy.

I mentioned that the JavaFX community appears to be growing and its ecosystem is growing rapidly. I stated that I had just read this week about DataFX, "a project that intends to make retrieving, massaging, populating, viewing, and editing data in JavaFX UI controls easier." Although I have not used DataFX (currently at version 0.0.5), this may be something of interest for those wanting easier integration of data sources and JavaFX UI controls. The JavaOne 2011 slides for JavaFX Datasources: Getting Real-World Data into JavaFX Controls provide introductory details regarding DataFX.

Q: Will JavaFX become incorporated into ADF?

This question reminded my of a question that I too have had. Although I did not specifically wonder if Oracle would incorporate JavaFX into their Application Developer Framework, I have wondered if Oracle would incorporate JavaFX 2 into their products in general (believe they will) and into NetBeans (and NetBeans Rich Client Platform) in particular (less certain of this). I responded as such and said that I could only speculate, but that I hoped that they would incorporate JavaFX and gradually replace components that are heavily Swing-based with JavaFX. Given the statements at JavaOne 2011 regarding JavaFX essentially replacing Swing as the client-side UI technology, this would seem logical. It will obviously take quite some time to make this happen.

I mentioned in my slides that JavaFX 2 provides built-in and customizable 2D shapes. In response to the question related to JavaFX 2's 3D support, I responded that I wasn't aware of any existing JavaFX 2 API support for 3D graphics.

It appears that support for "3D primitives" has been anticipated for JavaFX 2.1. A Richard Bair podcast (Java Spotlight Episode 16) provides more information on the need to have Java 7 for applet (plugin) delivery changes to support Prism and 3D more fully. Under the section titled "New Features Proposed for JavaFX," the JavaFX 2 Roadmap has a sub-section called "3D Graphics Support" that states, "JavaFX will feature support for 3D graphics that can be leveraged for modern forms of data visualization and advanced user experience."

I appreciated the great questions from attendees at my JavaFX 2 presentation at RMOUG Training Days 2012. They were such great questions that I thought it worth writing this post to summarize those questions and my best answers for those questions. I'm looking forward to the imminent release of Pro JavaFX 2 and am happy to see more of JavaFX open sourced and to see more JavaFX code examples online.