The recent 1.2 release of JavaFX included our first set of UI Controls. We talked about these recently at JavaOne. We’ve uploaded our slides to the controls portion of the talk. Unfortunately, the slides don’t contain all of the “filler” text you get when presenting the slides, so I’ll provide a little context here.
When designing the APIs for JavaFX, we wanted to focus on a couple core principles. First, we wanted to make the API simple and approachable. One of the things that Swing always struggled with was the steep learning curve. We wanted to put extra effort into making the JavaFX APIs easy to learn, and this carried into the UI Control API design as well.
But a simple API doesn’t mean a simplistic API. We wanted our API to also be very practical and useful. Jasper and I both have a background as application developers and that experience very strongly influenced the FX API design.
Finally, our API designs should be rich. There should be a lot of nice functionality built in for free (without burdening the API with conceptual overhead). There should be rich visual effects and interaction models. As engineers, we also want our APIs to be rich enough and flexible enough that you can really customize it.
On the 4th and 5th slides I show an architectural diagram. At first looking at the design you might just say “hey, its MVC!”. Well, yes, pretty close. The Control is basically the model, the Skin is basically the view, and the Behavior is basically the Controller. But there are some differences between our architecture and the “official” MVC architecture. The difference is that Controls are Nodes that can be placed in the scenegraph, so really they are part of the “view” hierarchy. However, Controls delegate their visuals to their Skin, so while they are part of the scenegraph, they really are mostly just models.
Most of the other slides are self explanatory. You might want to cross reference what you see in the slides with the official documentation.
This was a fun talk, we will have lots of posts with tips and tricks on using controls and charts in the coming months.
Jasper / Richard,
Yes, it was a great talk. I hope that you’ll publish information on creating custom UI controls on this blog.
Thanks, and congrats on JavaFX 1.2 as well as this blog!
Jim Weaver
http://JavaFXpert.com
Kudo’s on the additional controls, very simple to use and good looking.
Some further information on Skinning them would be very useful.
One more thing I’ve muttered about this elsewhere, but a basic HTML rendering control would make my life much much easier.
The perfect pattern already exists with MemeFX’s TextHTML control. It doesn’t need to be complex, just fast and scalable!
One more thing.
In my mind the gold standard for controls is what the guys at ext are doing.
http://extjs.com/products/extjs/
@Steven, thanks for the link, I’ll definitely check them out.