JavaFX Script Great for GUIs

Swing, Java 2D, and now JavaFX Script. Do we really need another scripting language for GUIs? This is what I asked Tech Days Evangelist Angela Caicedo after she presented Java FX to the attendees yesterday.

"It's not a replacement for Swing or Java 2D," she told me. "JavaFX Script is just another way to build GUIs, and it's friendlier to programmers who are more used to scripting languages. The learning curve is shorter for people with that experience."

"With Swing apps you have a Model View Controller and you do everything manually, create components, listeners, and all that," she told me. "With JavaFX Script you have the same components you have in Swing, but the way you describe them is easier and cleaner. You simply define the width, title, and all that inside a particular frame. Creating GUIs is really easy that way."


"Another powerful feature of JavaFX script is the binding--JavaFX gives you an easy way to bind your model with a view, updating your user interface as you program, changing your model.

"It's also important to know that you don't have to use JavaFX Script exclusively, you can mix plain Java with it, getting the best of both worlds. You can use JavaFX Script for your UI's and Java for your objects. In my Spot demo, the GUI was built with JavaFX Script."

"Other great powerful feature of JavaFX Script is the binding," says Angela. "You have a user interface--all GUI components. Normally, these are presenting data or model or just info, and JavaFX Script gives you an easy way to bind your model with a view. So when you change your model, your model automatically updates the user interface.

"Basically, JavaFX Script is a really good scripting language for user interfaces. It's young, and we're counting on the community to contribute. It's open, and is included in NetBeans, so everyone can participate."

A crowd formed around Angela to ask her more questions after the session. What were they asking? "People want to compare it with Flash, and I tell them, "for everything there's more than one solution. The advantage of JavaFX Script though is the power of the Java Platform. It's not just about JavaFX or GUIs or web services, its about using the Java platform."

0 comments:

Yang Sering Dibaca: