SlideShare ist ein Scribd-Unternehmen logo
1 von 77
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and Visage  Stephen Chin Chief Agile Methodologist, GXS steveonjava@gmail.com tweet: @steveonjava
About the Presenter Stephen Chin Java Champion Family Man Chief Agile Methodologist, GXS Author, Pro JavaFX Platform OSCON Java Conference Chair Motorcyclist
Disclaimer: This is code-heavy THE FOLLOWING IS INTENDED TO STIMULATE CREATIVE USE OF JVM LANGUAGES. AFTER WATCHING THIS PRESENTATION YOU MAY FEEL COMPELLED TO START LEARNING A NEW JVM LANGUAGE AND WANT TO APPLY IT AT YOUR WORKPLACE. THE PRESENTERS ARE NOT LIABLE FOR ANY INNOVATION, BREAKTHROUGHS, OR NP-COMPLETE SOLUTIONS THAT MAY RESULT.
JavaFX With Java
Programming Languages JavaFX 2.0 APIs are now in Java Pure Java APIs for all of JavaFX Expose JavaFX Binding, Sequences as Java APIs Embrace all JVM languages JRuby, Clojure, Groovy, Scala Fantom, Mira, Jython, etc. JavaFX Script is no longer supported by Oracle Existing JavaFX Script based applications will continue to run Visage is the open-source successor to the JavaFX Script language
JavaFX in Java JavaFX API follows JavaBeans approach Similar in feel to other UI toolkits (Swing, etc) Uses builder pattern to minimize boilerplate
Example Application public class HelloStage extends Application {   @Override public void start(Stage stage) {     stage.setTitle("Hello Stage"); stage.setWidth(600);     stage.setHeight(450); Group root = new Group();     Scene scene = new Scene(root); scene.setFill(Color.LIGHTGREEN); stage.setScene(scene); stage.setVisible(true);   }   public static void main(String[] args) { Launcher.launch(HelloStage.class, args);   } }
Binding Unquestionably the biggest JavaFX Script innovation Supported via a PropertyBinding class Lazy invocation for high performance Static construction syntax for simple cases e.g.: bindTo(<property>)
Observable Pseudo-Properties Supports watching for changes to properties Implemented via anonymous inner classes Will take advantage of closures in the future
Observable Pseudo-Properties final Rectangle rect = new Rectangle(); rect.setX(40); rect.setY(40); rect.setWidth(100); rect.setHeight(200); rect.hoverProperty().addListener(new ChangeListener<Boolean>() { });
Observable Pseudo-Properties final Rectangle rect = new Rectangle(); rect.setX(40); rect.setY(40); rect.setWidth(100); rect.setHeight(200); rect.hoverProperty().addListener(new ChangeListener<Boolean>() { }); The property we want to watch
Observable Pseudo-Properties final Rectangle rect = new Rectangle(); rect.setX(40); rect.setY(40); rect.setWidth(100); rect.setHeight(200); rect.hoverProperty().addListener(new ChangeListener<Boolean>() { }); Only one listener used with generics to specify the data type
Observable Pseudo-Properties final Rectangle rect = new Rectangle(); rect.setX(40); rect.setY(40); rect.setWidth(100); rect.setHeight(200); rect.hoverProperty().addListener(new ChangeListener<Boolean>() {   public void changed(ObservableValue<? extends Boolean> property, Boolean oldValue, Boolean value) {  } }); Refers to the Rectangle.hoverProperty()
Observable Pseudo-Properties final Rectangle rect = new Rectangle(); rect.setX(40); rect.setY(40); rect.setWidth(100); rect.setHeight(200); rect.hoverProperty().addListener(new ChangeListener<Boolean>() {   public void changed(ObservableValue<? extends Boolean> property, Boolean oldValue, Boolean value) {     rect.setFill(rect.isHover() ? Color.GREEN : Color.RED);   } });
Sequences in Java Replaced with an Observable List Public API is based on JavaFX sequences Internal code can use lighter collections API JavaFX 2.0 also has an Observable Map
JavaFX With JRuby
Why JRuby? ,[object Object]
Dynamic Typing
Closures
‘Closure conversion’ for interfaces,[object Object]
JRuby Example 1: Simple Stage require 'java' Application = Java::javafx.application.Application Launcher = Java::javafx.application.Launcher Stage = Java::javafx.stage.Stage Scene = Java::javafx.scene.Scene Color = Java::javafx.scene.paint.Color class HelloStage< Application   def start(stage)     .....   end end Launcher.launch(HelloStage.new); stage.title = 'Hello Stage (JRuby)' stage.width = 600 stage.height = 450 scene = Scene.new scene.fill = Color::LIGHTGREEN stage.scene = scene stage.visible = true;
JRuby Example 2 rect = Rectangle.new rect.x = 25 rect.y = 40 rect.width = 100 rect.height = 50 rect.fill = Color::RED scene.content.add(rect) timeline = Timeline.new timeline.repeat_count= Timeline::INDEFINITE timeline.auto_reverse = true kv = KeyValue.new(rect, Rectangle::X, 200); kf = KeyFrame.new(Duration.valueOf(500), kv); timeline.key_frames.addkf; timeline.play();
JRuby Closure Conversion rect.hoverProperty.addListener() do |prop, oldVal, newVal| rect.fill = rect.hover ? Color::GREEN : Color::RED; end 21
JRubySwiby require 'swiby' class HelloWorldModel attr_accessor :saying end model = HelloWorldModel.new model.saying = "Hello World" Frame {   title "Hello World“   width 200   content {     Label {       text bind(model,:saying)     }   }   visible true } 22
23 JavaFX With Clojure Artwork by Augusto Sellhorn http://sellmic.com/
A Little About      Clojure Started in 2007 by Rich Hickey Functional Programming Language Derived from LISP Optimized for High Concurrency … and looks nothing like Java! 24 (def hello (fn [] "Hello world")) (hello)
Clojure Syntax in One Slide Symbols numbers – 2.178 ratios – 355/113 strings – “clojure”, “rocks” characters –     symbols – a b c d keywords – :alpha :beta boolean – true, false null - nil Collections (commas optional) Lists (1, 2, 3, 4, 5) Vectors [1, 2, 3, 4, 5] Maps {:a 1, :b 2, :c 3, :d 4} Sets #{:a :b :c :d :e} 25 (plus macros that are syntactic sugar wrapping the above)
Clojure GUI Example (defnjavafxapp []   (let [stage (Stage. "JavaFX Stage")         scene (Scene.)]     (.setFill scene Color/LIGHTGREEN)     (.setWidth stage 600)     (.setHeight stage 450)     (.setScene stage scene)     (.setVisible stage true))) (javafxapp) 26
Clojure GUI Example (defnjavafxapp[]   (let [stage (Stage. "JavaFX Stage")         scene (Scene.)]     (.setFill scene Color/LIGHTGREEN)     (.setWidth stage 600)     (.setHeight stage 450)     (.setScene stage scene)     (.setVisible stage true))) (javafxapp) 27 Create a Function for the Application
Clojure GUI Example (defnjavafxapp [] (let [stage (Stage. "JavaFX Stage")         scene (Scene.)]     (.setFill scene Color/LIGHTGREEN)     (.setWidth stage 600)     (.setHeight stage 450)     (.setScene stage scene)     (.setVisible stage true))) (javafxapp) 28 Initialize the Stage and Scene Variables
Clojure GUI Example (defnjavafxapp []   (let [stage (Stage. "JavaFX Stage")         scene (Scene.)]     (.setFill scene Color/LIGHTGREEN)     (.setWidth stage 600)     (.setHeight stage 450)     (.setScene stage scene)     (.setVisible stage true))) (javafxapp) 29 Call Setter Methods on Scene and Stage
Clojure GUI Example (defnjavafxapp []   (let [stage (Stage. "JavaFX Stage")         scene (Scene.)]     (.setFillscene Color/LIGHTGREEN)     (.setWidthstage 600)     (.setHeightstage 450)     (.setScenestage scene)     (.setVisiblestage true))) (javafxapp) 30 Java Constant Syntax Java Method Syntax
Simpler Code Using doto (defnjavafxapp []   (let [stage (Stage. "JavaFX Stage")         scene (Scene.)]     (doto scene       (.setFillColor/LIGHTGREEN))     (doto stage       (.setWidth600)       (.setHeight450)       (.setScene scene)       (.setVisibletrue)))) (javafxapp) 31
Simpler Code Using doto (defnjavafxapp []   (let [stage (Stage. "JavaFX Stage")         scene (Scene.)]     (doto scene       (.setFillColor/LIGHTGREEN))     (doto stage       (.setWidth 600)       (.setHeight 450)       (.setScene scene)       (.setVisible true)))) (javafxapp) 32 doto form: (doto symbol    (.method params))  equals: (.method symbol params)
Refined Clojure GUI Example (defnjavafxapp []   (doto (Stage. "JavaFX Stage")     (.setWidth600)     (.setHeight450)     (.setScene (doto (Scene.)       (.setFillColor/LIGHTGREEN)       (.setContent (list (doto (Rectangle.)         (.setX25)         (.setY40)         (.setWidth100)         (.setHeight50)         (.setFillColor/RED))))))     (.setVisibletrue))) (javafxapp) 33
Refined Clojure GUI Example (defnjavafxapp []   (doto(Stage. "JavaFX Stage")     (.setWidth 600)     (.setHeight 450)     (.setScene (doto(Scene.)       (.setFillColor/LIGHTGREEN)       (.setContent (list (doto (Rectangle.)         (.setX 25)         (.setY 40)         (.setWidth 100)         (.setHeight 50)         (.setFillColor/RED))))))     (.setVisible true))) (javafxapp) 34 Let replaced with inline declarations
Refined Clojure GUI Example (defnjavafxapp []   (doto (Stage. "JavaFX Stage")     (.setWidth 600)     (.setHeight 450)     (.setScene (doto (Scene.)       (.setFillColor/LIGHTGREEN)       (.setContent (list (doto (Rectangle.)         (.setX 25)         (.setY 40)         (.setWidth 100)         (.setHeight 50)         (.setFillColor/RED))))))     (.setVisible true))) (javafxapp) 35 Doto allows nested data structures
Refined Clojure GUI Example (defnjavafxapp []   (doto (Stage. "JavaFX Stage")     (.setWidth 600)     (.setHeight 450)     (.setScene (doto (Scene.)       (.setFillColor/LIGHTGREEN)       (.setContent (list (doto (Rectangle.)         (.setX 25)         (.setY 40)         (.setWidth 100)         (.setHeight 50)         (.setFillColor/RED))))))     (.setVisible true))) (javafxapp) 36 Now a nested Rectangle fits!
Closures in Clojure 37 Inner classes can be created using proxy (.addListenerhoverProperty   (proxy[ChangeListener] []     (handle [p, o, v]       (.setFillrect         (if (.isHoverrect) Color/GREEN Color/RED)))))
Closures in Clojure Inner classes can be created using proxy 38 Proxy form: (proxy [class] [args] fs+)  f => (name [params*] body) (.addListenerhoverProperty   (proxy[ChangeListener][]     (handle [p, o, v]       (.setFillrect         (if (.isHoverrect) Color/GREEN Color/RED)))))
JavaFX With Groovy
Features of Groovy Tight integration with Java Very easy to port from Java to Groovy Declarative syntax Familiar to JavaFX Script developers Builders
Example 1: Simple FX Script to Groovy
Step 1: Lazy conversion to Groovy class HelloStage extends Application {  void start(stage) {     stage.setTitle("Hello Stage (Groovy)“); stage.setWidth(600); stage.setHeight(450);     Scene scene = new Scene(); scene.setFill(Color.LIGHTSKYBLUE); stage.setScene(scene); stage.setVisible(true);   } static void main(args) { Launcher.launch(HelloStage.class, args);   } }
Step 2: Slightly More Groovy class HelloStage extends Application {     void start(stage) {         new Stage(             title: "Hello Stage (Groovy)",             width: 600,             height: 450,             visible: true,             scene: new Scene(                 fill: Color.LIGHTSKYBLUE,             )         );     }     static void main(args) { Launcher.launch(HelloStage.class, args);     } }
Slight Aside: Groovy Builders Groovy builders make writing custom DSLs easy For the next slide, I am using a builder I defined Hopefully the community will improve upon this
Step 3: Using a Groovy Builder FxBuilder.build {     stage = stage(         title: "Hello World",           width: 600,           height: 450,         scene: scene(fill: Color.LIGHTSKYBLUE) {             ...         }     )     stage.visible = true; }
Step 4: With Content FxBuilder.build {     stage = stage(         title: "Hello Rectangle (Groovy FxBuilder 2)",           width: 600,           height: 450,         scene: scene(fill: Color.LIGHTSKYBLUE) {             rectangle(                 x: 25, y: 40,                 width: 100, height: 50,                 fill: Color.RED             )        }     )     stage.visible = true; }
Example 2: FX Script Animation in Groovy
Step 1: JavaFX Script def timeline = Timeline { repeatCount: Timeline.INDEFINITE autoReverse: true keyFrames: [ KeyFrame {       time: 750ms       values : [         rect1.x => 200.0 tweenInterpolator.LINEAR,         rect2.y => 200.0 tweenInterpolator.LINEAR,         circle1.radius => 200.0 tweenInterpolator.LINEAR       ]     }   ]; } timeline.play();
Step 1a: JavaFX Script Simplification def timeline = Timeline { repeatCount: Timeline.INDEFINITE autoReverse: true   keyFrames: at (750ms) {     rect1.x => 200.0 tween Interpolator.LINEAR;     rect2.y => 200.0 tween Interpolator.LINEAR;     circle1.radius => 200.0 tween Interpolator.LINEAR;   } } timeline.play();
Step 2: Java-ish Groovy Animations final Timeline timeline = new Timeline( repeatCount: Timeline.INDEFINITE, autoReverse: true ) final KeyValue kv1 = new KeyValue (rect1.x(), 200); final KeyValue kv2 = new KeyValue (rect2.y(), 200); final KeyValue kv3 = new KeyValue (circle1.radius(), 200); final KeyFramekf = new KeyFrame(Duration.valueOf(750), kv1, kv2, kv3); timeline.getKeyFrames().add(kf); timeline.play();
Step 3: JavaFX Animation Groovy DSL (courtesy of Jim Clarke – work in progress) timeline = timeline(repeatCount: Timeline.INDEFINITE, autoReverse: true) {   at 750.ms update values {    change rect1.y() to 200    change rect2.x() to 200    change circle.radius() to 200  } } timeline.play();
Groovy Closures  - With interface coercion def f = {  p, o, v -> rect.setFill(rect.isHover() ? Color.GREEN : Color.RED); } as ChangeListener; rect.hoverProperty().addListener(f);
53 JavaFX With Scala
What is Scala Started in 2001 by Martin Odersky Compiles to Java bytecodes Pure object-oriented language Also a functional programming language 54
Why Scala? Shares many language features with JavaFX Script that make GUI programming easier: Static type checking – Catch your errors at compile time Closures – Wrap behavior and pass it by reference Declarative – Express the UI by describing what it should look like Scala also supports DSLs! 55
Java vs. Scala DSL public class HelloStage extends Application {   public void start(Stage stage) {     stage.setTitle("Hello Stage"); stage.setWidth(600); stage.setHeight(450);     Scene scene = new Scene(); scene.setFill(Color.LIGHTGREEN);     Rectangle rect = new Rectangle(); rect.setX(25); rect.setY(40); rect.setWidth(100); rect.setHeight(50); rect.setFill(Color.RED); stage.add(rect); stage.setScene(scene); stage.setVisible(true);   }   public static void main(String[] args) { Launcher.launch(HelloStage.class, args);   } } object HelloJavaFX extends JavaFXApplication {   def stage = new Stage {     title = "Hello Stage"     width = 600     height = 450     scene = new Scene {       fill = Color.LIGHTGREEN       content = List(new Rectangle {         x = 25         y = 40         width = 100         height = 50         fill = Color.RED       })     }   } } 56 21 Lines 541 Characters 17 Lines 324 Characters
object HelloJavaFX extends JavaFXApplication {   def stage = new Stage {     title = "Hello Stage"     width = 600     height = 450     scene = new Scene {       fill = Color.LIGHTGREEN       content = List(new Rectangle {         x = 25         y = 40         width = 100         height = 50         fill = Color.RED       })     }   } } 57
58 object HelloJavaFX extends JavaFXApplication {   def stage = new Stage {     title = "Hello Stage"     width = 600     height = 450     scene = new Scene {       fill = Color.LIGHTGREEN       content = List(new Rectangle {         x = 25         y = 40         width = 100         height = 50         fill = Color.RED       })     }   } } object HelloJavaFX extends JavaFXApplication {   def stage = new Stage {     title = "Hello Stage"     width = 600     height = 450     scene = new Scene {       fill = Color.LIGHTGREEN       content = List(new Rectangle {         x = 25         y = 40         width = 100         height = 50         fill = Color.RED       })     }   } } Base class for JavaFX applications
59 object HelloJavaFX extends JavaFXApplication { def stage = new Stage {     title = "Hello Stage"     width = 600     height = 450     scene = new Scene {       fill = Color.LIGHTGREEN       content = List(new Rectangle {         x = 25         y = 40         width = 100         height = 50         fill = Color.RED       })     }   } } Declarative Stage definition
60 object HelloJavaFX extends JavaFXApplication {   def stage = new Stage { title = "Hello Stage"     width = 600     height = 450     scene = new Scene {       fill = Color.LIGHTGREEN       content = List(new Rectangle {         x = 25         y = 40         width = 100         height = 50         fill = Color.RED       })     }   } } Inline property definitions
61 object HelloJavaFX extends JavaFXApplication {   def stage = new Stage {     title = "Hello Stage"     width = 600     height = 450     scene = new Scene {       fill = Color.LIGHTGREEN       content = List(new Rectangle {         x = 25         y = 40         width = 100         height = 50         fill = Color.RED       })     }   } } List Construction Syntax
Animation in Scala def timeline = new Timeline { repeatCount = INDEFINITE autoReverse = true keyFrames = List(       new KeyFrame(time: 50) {         values = List(           new KeyValue(rect1.x() -> 300),           new KeyValue(rect2.y() -> 500),           new KeyValue(rect2.width() -> 150)         )       }     )   } 62
def timeline = new Timeline { repeatCount = INDEFINITE autoReverse = true keyFrames = List(       new KeyFrame(time: 50) {         values = List(           new KeyValue(rect1.x() -> 300),           new KeyValue(rect2.y() -> 500),           new KeyValue(rect2.width() -> 150)         )       }     )   } Animation in Scala 63 Duration set by Constructor Parameter
Animation in Scala 64 def timeline = new Timeline { repeatCount = INDEFINITE autoReverse = true keyFrames = List(       new KeyFrame(time: 50) {         values = List(           new KeyValue(rect1.x() -> 300),           new KeyValue(rect2.y() -> 500),           new KeyValue(rect2.width() -> 150)         )       }     )   } Operator overloading for animation syntax
Closures in Scala 65 Closures are also supported in Scala And they are 100% type-safe rect.hoverProperty().addListener((p, o, v) => { rect.fill = if (rect.hover) Color.GREEN else Color.RED })
Closures in Scala Closures are also supported in Scala And they are 100% type-safe 66 rect.hoverProperty().addListener((p, o, v) => { rect.fill = if (rect.hover) Color.GREEN else Color.RED }) Compact syntax (params) => {body}
Other JVM Languages to Try Jython Started by Jim Hugunin High Performance Python Mirah Invented by Charles Nutter Originally called Duby Local Type Inference, Static and Dynamic Typing Fantom Created by Brian and Andy Frank Originally called Fan Built-in Declarative Syntax Portable to Java and .NET Local Type Inference, Static and Dynamic Typing 67
Fantom Code Example Void main() {   Stage {     title= "Hello Stage"     width= 600     height= 450    Scene {       fill= Color.LIGHTGREEN       Rectangle {         x= 25         y= 40         width= 100         height= 50         fill= Color.RED       }     }   }.open } 68
timeline := Timeline {   repeatCount = Timeline.INDEFINITE   autoReverse = true KeyFrame {    time = 50ms KeyValue(rect1.x()-> 300),     KeyValue(rect2.y() -> 500),     KeyValue(rect2.width() -> 150) } } Animation in Fantom 69 Fantom has a built-in Duration type And also supports operator overloading
Announcing Project Visage 70 ,[object Object],Visage project goals: Compile to JavaFX Java APIs Evolve the Language (Annotations, Maps, etc.) Support Other Toolkits Come join the team! For more info: http://visage-lang.org/
How about JavaFX on…  Visage Stage {   title: "Hello Stage"   width: 600   height: 450  scene: Scene {     fill: Color.LIGHTGREEN     content: Rectangle {       x: 25       y: 40       width: 100       height: 50       fill: Color.RED     }   } } 71
How about JavaFX on…  Visage Stage {   title: "Hello Stage"   width: 600   height: 450 scene: Scene {     fill: Color.LIGHTGREEN content: Rectangle {       x: 25       y: 40       width: 100       height: 50       fill: Color.RED     }   } } 72
How about JavaFX on…  Visage Stage {   title: "Hello Stage"   width: 600   height: 450  Scene {     fill: Color.LIGHTGREEN     Rectangle {       x: 25       y: 40       width: 100       height: 50       fill: Color.RED     }   } } 73
Conclusion You can write JavaFX applications in pure Java JavaFX is also usable in alternate languages Over time improved support is possible Groovy Builders, Scala DSL, Visage Remember: This is a proof of concept only – you can not leave this session and do this today.
JavaFX 2.0 Product Timeline CYQ1 2011 CYQ3 2011 CYQ2 2011 JavaFX 2.0 EA (Early Access) JavaFX 2.0 Beta JavaFX 2.0 GA (General Availability) Copyright 2010 Oracle JavaFX Beta in Late May!

Weitere ähnliche Inhalte

Was ist angesagt?

JavaFX and Scala in the Cloud
JavaFX and Scala in the CloudJavaFX and Scala in the Cloud
JavaFX and Scala in the CloudStephen Chin
 
JavaFX Your Way: Building JavaFX Applications with Alternative Languages
JavaFX Your Way: Building JavaFX Applications with Alternative LanguagesJavaFX Your Way: Building JavaFX Applications with Alternative Languages
JavaFX Your Way: Building JavaFX Applications with Alternative LanguagesStephen Chin
 
JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]Stephen Chin
 
The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189Mahmoud Samir Fayed
 
Backbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The BrowserBackbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The BrowserHoward Lewis Ship
 
Beyond Breakpoints: Advanced Debugging with XCode
Beyond Breakpoints: Advanced Debugging with XCodeBeyond Breakpoints: Advanced Debugging with XCode
Beyond Breakpoints: Advanced Debugging with XCodeAijaz Ansari
 
The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84Mahmoud Samir Fayed
 
Scala vs Java 8 in a Java 8 World
Scala vs Java 8 in a Java 8 WorldScala vs Java 8 in a Java 8 World
Scala vs Java 8 in a Java 8 WorldBTI360
 
Clojure: Functional Concurrency for the JVM (presented at OSCON)
Clojure: Functional Concurrency for the JVM (presented at OSCON)Clojure: Functional Concurrency for the JVM (presented at OSCON)
Clojure: Functional Concurrency for the JVM (presented at OSCON)Howard Lewis Ship
 
An introduction to scala
An introduction to scalaAn introduction to scala
An introduction to scalaXing
 
Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2Ralph Schindler
 
Scala ActiveRecord
Scala ActiveRecordScala ActiveRecord
Scala ActiveRecordscalaconfjp
 
JDays Lviv 2014: Java8 vs Scala: Difference points & innovation stream
JDays Lviv 2014:  Java8 vs Scala:  Difference points & innovation streamJDays Lviv 2014:  Java8 vs Scala:  Difference points & innovation stream
JDays Lviv 2014: Java8 vs Scala: Difference points & innovation streamRuslan Shevchenko
 
The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84Mahmoud Samir Fayed
 
code for quiz in my sql
code for quiz  in my sql code for quiz  in my sql
code for quiz in my sql JOYITAKUNDU1
 
Java7 New Features and Code Examples
Java7 New Features and Code ExamplesJava7 New Features and Code Examples
Java7 New Features and Code ExamplesNaresh Chintalcheru
 

Was ist angesagt? (19)

JavaFX and Scala in the Cloud
JavaFX and Scala in the CloudJavaFX and Scala in the Cloud
JavaFX and Scala in the Cloud
 
JavaFX Your Way: Building JavaFX Applications with Alternative Languages
JavaFX Your Way: Building JavaFX Applications with Alternative LanguagesJavaFX Your Way: Building JavaFX Applications with Alternative Languages
JavaFX Your Way: Building JavaFX Applications with Alternative Languages
 
JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]
 
The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189
 
Backbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The BrowserBackbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The Browser
 
Beyond Breakpoints: Advanced Debugging with XCode
Beyond Breakpoints: Advanced Debugging with XCodeBeyond Breakpoints: Advanced Debugging with XCode
Beyond Breakpoints: Advanced Debugging with XCode
 
The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84
 
Scala in practice
Scala in practiceScala in practice
Scala in practice
 
Scala vs Java 8 in a Java 8 World
Scala vs Java 8 in a Java 8 WorldScala vs Java 8 in a Java 8 World
Scala vs Java 8 in a Java 8 World
 
Clojure: Functional Concurrency for the JVM (presented at OSCON)
Clojure: Functional Concurrency for the JVM (presented at OSCON)Clojure: Functional Concurrency for the JVM (presented at OSCON)
Clojure: Functional Concurrency for the JVM (presented at OSCON)
 
An introduction to scala
An introduction to scalaAn introduction to scala
An introduction to scala
 
Alternate JVM Languages
Alternate JVM LanguagesAlternate JVM Languages
Alternate JVM Languages
 
Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2Zend Framework 1 + Doctrine 2
Zend Framework 1 + Doctrine 2
 
Scala ActiveRecord
Scala ActiveRecordScala ActiveRecord
Scala ActiveRecord
 
iBATIS
iBATISiBATIS
iBATIS
 
JDays Lviv 2014: Java8 vs Scala: Difference points & innovation stream
JDays Lviv 2014:  Java8 vs Scala:  Difference points & innovation streamJDays Lviv 2014:  Java8 vs Scala:  Difference points & innovation stream
JDays Lviv 2014: Java8 vs Scala: Difference points & innovation stream
 
The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84
 
code for quiz in my sql
code for quiz  in my sql code for quiz  in my sql
code for quiz in my sql
 
Java7 New Features and Code Examples
Java7 New Features and Code ExamplesJava7 New Features and Code Examples
Java7 New Features and Code Examples
 

Ähnlich wie JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and Visage

JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...Stephen Chin
 
JavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative LanguagesJavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative LanguagesStephen Chin
 
JavaFX Your Way - Devoxx Version
JavaFX Your Way - Devoxx VersionJavaFX Your Way - Devoxx Version
JavaFX Your Way - Devoxx VersionStephen Chin
 
Greach, GroovyFx Workshop
Greach, GroovyFx WorkshopGreach, GroovyFx Workshop
Greach, GroovyFx WorkshopDierk König
 
Don't panic in Fortaleza - ScalaFX
Don't panic in Fortaleza - ScalaFXDon't panic in Fortaleza - ScalaFX
Don't panic in Fortaleza - ScalaFXAlain Béarez
 
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)Stephen Chin
 
XML-Free Programming
XML-Free ProgrammingXML-Free Programming
XML-Free ProgrammingStephen Chin
 
JJUG CCC 2011 Spring
JJUG CCC 2011 SpringJJUG CCC 2011 Spring
JJUG CCC 2011 SpringKiyotaka Oku
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1Bitla Software
 
Intro to JavaFX & Widget FX
Intro to JavaFX & Widget FXIntro to JavaFX & Widget FX
Intro to JavaFX & Widget FXStephen Chin
 
Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...
Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...
Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...Naresha K
 
Vert.x - Reactive & Distributed [Devoxx version]
Vert.x - Reactive & Distributed [Devoxx version]Vert.x - Reactive & Distributed [Devoxx version]
Vert.x - Reactive & Distributed [Devoxx version]Orkhan Gasimov
 
Swift - One step forward from Obj-C
Swift -  One step forward from Obj-CSwift -  One step forward from Obj-C
Swift - One step forward from Obj-CNissan Tsafrir
 

Ähnlich wie JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and Visage (20)

JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
 
JavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative LanguagesJavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative Languages
 
JavaFX Your Way - Devoxx Version
JavaFX Your Way - Devoxx VersionJavaFX Your Way - Devoxx Version
JavaFX Your Way - Devoxx Version
 
Groovy's Builder
Groovy's BuilderGroovy's Builder
Groovy's Builder
 
Clojure And Swing
Clojure And SwingClojure And Swing
Clojure And Swing
 
JavaFX introduction
JavaFX introductionJavaFX introduction
JavaFX introduction
 
Greach, GroovyFx Workshop
Greach, GroovyFx WorkshopGreach, GroovyFx Workshop
Greach, GroovyFx Workshop
 
Don't panic in Fortaleza - ScalaFX
Don't panic in Fortaleza - ScalaFXDon't panic in Fortaleza - ScalaFX
Don't panic in Fortaleza - ScalaFX
 
JavaFX Overview
JavaFX OverviewJavaFX Overview
JavaFX Overview
 
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
 
Griffon @ Svwjug
Griffon @ SvwjugGriffon @ Svwjug
Griffon @ Svwjug
 
XML-Free Programming
XML-Free ProgrammingXML-Free Programming
XML-Free Programming
 
JJUG CCC 2011 Spring
JJUG CCC 2011 SpringJJUG CCC 2011 Spring
JJUG CCC 2011 Spring
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
 
JavaFX
JavaFXJavaFX
JavaFX
 
Intro to JavaFX & Widget FX
Intro to JavaFX & Widget FXIntro to JavaFX & Widget FX
Intro to JavaFX & Widget FX
 
Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...
Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...
Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...
 
Vert.x - Reactive & Distributed [Devoxx version]
Vert.x - Reactive & Distributed [Devoxx version]Vert.x - Reactive & Distributed [Devoxx version]
Vert.x - Reactive & Distributed [Devoxx version]
 
Swift - One step forward from Obj-C
Swift -  One step forward from Obj-CSwift -  One step forward from Obj-C
Swift - One step forward from Obj-C
 
Groovy
GroovyGroovy
Groovy
 

Mehr von Stephen Chin

DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2Stephen Chin
 
10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java CommunityStephen Chin
 
Java Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive GuideJava Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive GuideStephen Chin
 
DevOps Tools for Java Developers
DevOps Tools for Java DevelopersDevOps Tools for Java Developers
DevOps Tools for Java DevelopersStephen Chin
 
Java Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJCJava Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJCStephen Chin
 
RetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming ConsoleRetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming ConsoleStephen Chin
 
JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)Stephen Chin
 
Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)Stephen Chin
 
Devoxx4Kids Lego Workshop
Devoxx4Kids Lego WorkshopDevoxx4Kids Lego Workshop
Devoxx4Kids Lego WorkshopStephen Chin
 
Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)Stephen Chin
 
Confessions of a Former Agile Methodologist
Confessions of a Former Agile MethodologistConfessions of a Former Agile Methodologist
Confessions of a Former Agile MethodologistStephen Chin
 
Internet of Things Magic Show
Internet of Things Magic ShowInternet of Things Magic Show
Internet of Things Magic ShowStephen Chin
 
Zombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the UndeadZombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the UndeadStephen Chin
 
JCrete Embedded Java Workshop
JCrete Embedded Java WorkshopJCrete Embedded Java Workshop
JCrete Embedded Java WorkshopStephen Chin
 
Oracle IoT Kids Workshop
Oracle IoT Kids WorkshopOracle IoT Kids Workshop
Oracle IoT Kids WorkshopStephen Chin
 
OpenJFX on Android and Devices
OpenJFX on Android and DevicesOpenJFX on Android and Devices
OpenJFX on Android and DevicesStephen Chin
 
Java on Raspberry Pi Lab
Java on Raspberry Pi LabJava on Raspberry Pi Lab
Java on Raspberry Pi LabStephen Chin
 
Java 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosJava 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosStephen Chin
 
Devoxx4Kids NAO Workshop
Devoxx4Kids NAO WorkshopDevoxx4Kids NAO Workshop
Devoxx4Kids NAO WorkshopStephen Chin
 

Mehr von Stephen Chin (20)

DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2
 
10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community
 
Java Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive GuideJava Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive Guide
 
DevOps Tools for Java Developers
DevOps Tools for Java DevelopersDevOps Tools for Java Developers
DevOps Tools for Java Developers
 
Java Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJCJava Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJC
 
RetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming ConsoleRetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming Console
 
JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)
 
Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)
 
Devoxx4Kids Lego Workshop
Devoxx4Kids Lego WorkshopDevoxx4Kids Lego Workshop
Devoxx4Kids Lego Workshop
 
Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)
 
Confessions of a Former Agile Methodologist
Confessions of a Former Agile MethodologistConfessions of a Former Agile Methodologist
Confessions of a Former Agile Methodologist
 
Internet of Things Magic Show
Internet of Things Magic ShowInternet of Things Magic Show
Internet of Things Magic Show
 
Zombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the UndeadZombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the Undead
 
JCrete Embedded Java Workshop
JCrete Embedded Java WorkshopJCrete Embedded Java Workshop
JCrete Embedded Java Workshop
 
Oracle IoT Kids Workshop
Oracle IoT Kids WorkshopOracle IoT Kids Workshop
Oracle IoT Kids Workshop
 
OpenJFX on Android and Devices
OpenJFX on Android and DevicesOpenJFX on Android and Devices
OpenJFX on Android and Devices
 
Java on Raspberry Pi Lab
Java on Raspberry Pi LabJava on Raspberry Pi Lab
Java on Raspberry Pi Lab
 
Java 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosJava 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and Legos
 
DukeScript
DukeScriptDukeScript
DukeScript
 
Devoxx4Kids NAO Workshop
Devoxx4Kids NAO WorkshopDevoxx4Kids NAO Workshop
Devoxx4Kids NAO Workshop
 

Kürzlich hochgeladen

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 

Kürzlich hochgeladen (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 

JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and Visage

  • 1. JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and Visage Stephen Chin Chief Agile Methodologist, GXS steveonjava@gmail.com tweet: @steveonjava
  • 2. About the Presenter Stephen Chin Java Champion Family Man Chief Agile Methodologist, GXS Author, Pro JavaFX Platform OSCON Java Conference Chair Motorcyclist
  • 3. Disclaimer: This is code-heavy THE FOLLOWING IS INTENDED TO STIMULATE CREATIVE USE OF JVM LANGUAGES. AFTER WATCHING THIS PRESENTATION YOU MAY FEEL COMPELLED TO START LEARNING A NEW JVM LANGUAGE AND WANT TO APPLY IT AT YOUR WORKPLACE. THE PRESENTERS ARE NOT LIABLE FOR ANY INNOVATION, BREAKTHROUGHS, OR NP-COMPLETE SOLUTIONS THAT MAY RESULT.
  • 5. Programming Languages JavaFX 2.0 APIs are now in Java Pure Java APIs for all of JavaFX Expose JavaFX Binding, Sequences as Java APIs Embrace all JVM languages JRuby, Clojure, Groovy, Scala Fantom, Mira, Jython, etc. JavaFX Script is no longer supported by Oracle Existing JavaFX Script based applications will continue to run Visage is the open-source successor to the JavaFX Script language
  • 6. JavaFX in Java JavaFX API follows JavaBeans approach Similar in feel to other UI toolkits (Swing, etc) Uses builder pattern to minimize boilerplate
  • 7. Example Application public class HelloStage extends Application { @Override public void start(Stage stage) { stage.setTitle("Hello Stage"); stage.setWidth(600); stage.setHeight(450); Group root = new Group(); Scene scene = new Scene(root); scene.setFill(Color.LIGHTGREEN); stage.setScene(scene); stage.setVisible(true); } public static void main(String[] args) { Launcher.launch(HelloStage.class, args); } }
  • 8. Binding Unquestionably the biggest JavaFX Script innovation Supported via a PropertyBinding class Lazy invocation for high performance Static construction syntax for simple cases e.g.: bindTo(<property>)
  • 9. Observable Pseudo-Properties Supports watching for changes to properties Implemented via anonymous inner classes Will take advantage of closures in the future
  • 10. Observable Pseudo-Properties final Rectangle rect = new Rectangle(); rect.setX(40); rect.setY(40); rect.setWidth(100); rect.setHeight(200); rect.hoverProperty().addListener(new ChangeListener<Boolean>() { });
  • 11. Observable Pseudo-Properties final Rectangle rect = new Rectangle(); rect.setX(40); rect.setY(40); rect.setWidth(100); rect.setHeight(200); rect.hoverProperty().addListener(new ChangeListener<Boolean>() { }); The property we want to watch
  • 12. Observable Pseudo-Properties final Rectangle rect = new Rectangle(); rect.setX(40); rect.setY(40); rect.setWidth(100); rect.setHeight(200); rect.hoverProperty().addListener(new ChangeListener<Boolean>() { }); Only one listener used with generics to specify the data type
  • 13. Observable Pseudo-Properties final Rectangle rect = new Rectangle(); rect.setX(40); rect.setY(40); rect.setWidth(100); rect.setHeight(200); rect.hoverProperty().addListener(new ChangeListener<Boolean>() { public void changed(ObservableValue<? extends Boolean> property, Boolean oldValue, Boolean value) { } }); Refers to the Rectangle.hoverProperty()
  • 14. Observable Pseudo-Properties final Rectangle rect = new Rectangle(); rect.setX(40); rect.setY(40); rect.setWidth(100); rect.setHeight(200); rect.hoverProperty().addListener(new ChangeListener<Boolean>() { public void changed(ObservableValue<? extends Boolean> property, Boolean oldValue, Boolean value) { rect.setFill(rect.isHover() ? Color.GREEN : Color.RED); } });
  • 15. Sequences in Java Replaced with an Observable List Public API is based on JavaFX sequences Internal code can use lighter collections API JavaFX 2.0 also has an Observable Map
  • 17.
  • 20.
  • 21. JRuby Example 1: Simple Stage require 'java' Application = Java::javafx.application.Application Launcher = Java::javafx.application.Launcher Stage = Java::javafx.stage.Stage Scene = Java::javafx.scene.Scene Color = Java::javafx.scene.paint.Color class HelloStage< Application def start(stage) ..... end end Launcher.launch(HelloStage.new); stage.title = 'Hello Stage (JRuby)' stage.width = 600 stage.height = 450 scene = Scene.new scene.fill = Color::LIGHTGREEN stage.scene = scene stage.visible = true;
  • 22. JRuby Example 2 rect = Rectangle.new rect.x = 25 rect.y = 40 rect.width = 100 rect.height = 50 rect.fill = Color::RED scene.content.add(rect) timeline = Timeline.new timeline.repeat_count= Timeline::INDEFINITE timeline.auto_reverse = true kv = KeyValue.new(rect, Rectangle::X, 200); kf = KeyFrame.new(Duration.valueOf(500), kv); timeline.key_frames.addkf; timeline.play();
  • 23. JRuby Closure Conversion rect.hoverProperty.addListener() do |prop, oldVal, newVal| rect.fill = rect.hover ? Color::GREEN : Color::RED; end 21
  • 24. JRubySwiby require 'swiby' class HelloWorldModel attr_accessor :saying end model = HelloWorldModel.new model.saying = "Hello World" Frame { title "Hello World“ width 200 content { Label { text bind(model,:saying) } } visible true } 22
  • 25. 23 JavaFX With Clojure Artwork by Augusto Sellhorn http://sellmic.com/
  • 26. A Little About Clojure Started in 2007 by Rich Hickey Functional Programming Language Derived from LISP Optimized for High Concurrency … and looks nothing like Java! 24 (def hello (fn [] "Hello world")) (hello)
  • 27. Clojure Syntax in One Slide Symbols numbers – 2.178 ratios – 355/113 strings – “clojure”, “rocks” characters – symbols – a b c d keywords – :alpha :beta boolean – true, false null - nil Collections (commas optional) Lists (1, 2, 3, 4, 5) Vectors [1, 2, 3, 4, 5] Maps {:a 1, :b 2, :c 3, :d 4} Sets #{:a :b :c :d :e} 25 (plus macros that are syntactic sugar wrapping the above)
  • 28. Clojure GUI Example (defnjavafxapp [] (let [stage (Stage. "JavaFX Stage") scene (Scene.)] (.setFill scene Color/LIGHTGREEN) (.setWidth stage 600) (.setHeight stage 450) (.setScene stage scene) (.setVisible stage true))) (javafxapp) 26
  • 29. Clojure GUI Example (defnjavafxapp[] (let [stage (Stage. "JavaFX Stage") scene (Scene.)] (.setFill scene Color/LIGHTGREEN) (.setWidth stage 600) (.setHeight stage 450) (.setScene stage scene) (.setVisible stage true))) (javafxapp) 27 Create a Function for the Application
  • 30. Clojure GUI Example (defnjavafxapp [] (let [stage (Stage. "JavaFX Stage") scene (Scene.)] (.setFill scene Color/LIGHTGREEN) (.setWidth stage 600) (.setHeight stage 450) (.setScene stage scene) (.setVisible stage true))) (javafxapp) 28 Initialize the Stage and Scene Variables
  • 31. Clojure GUI Example (defnjavafxapp [] (let [stage (Stage. "JavaFX Stage") scene (Scene.)] (.setFill scene Color/LIGHTGREEN) (.setWidth stage 600) (.setHeight stage 450) (.setScene stage scene) (.setVisible stage true))) (javafxapp) 29 Call Setter Methods on Scene and Stage
  • 32. Clojure GUI Example (defnjavafxapp [] (let [stage (Stage. "JavaFX Stage") scene (Scene.)] (.setFillscene Color/LIGHTGREEN) (.setWidthstage 600) (.setHeightstage 450) (.setScenestage scene) (.setVisiblestage true))) (javafxapp) 30 Java Constant Syntax Java Method Syntax
  • 33. Simpler Code Using doto (defnjavafxapp [] (let [stage (Stage. "JavaFX Stage") scene (Scene.)] (doto scene (.setFillColor/LIGHTGREEN)) (doto stage (.setWidth600) (.setHeight450) (.setScene scene) (.setVisibletrue)))) (javafxapp) 31
  • 34. Simpler Code Using doto (defnjavafxapp [] (let [stage (Stage. "JavaFX Stage") scene (Scene.)] (doto scene (.setFillColor/LIGHTGREEN)) (doto stage (.setWidth 600) (.setHeight 450) (.setScene scene) (.setVisible true)))) (javafxapp) 32 doto form: (doto symbol (.method params)) equals: (.method symbol params)
  • 35. Refined Clojure GUI Example (defnjavafxapp [] (doto (Stage. "JavaFX Stage") (.setWidth600) (.setHeight450) (.setScene (doto (Scene.) (.setFillColor/LIGHTGREEN) (.setContent (list (doto (Rectangle.) (.setX25) (.setY40) (.setWidth100) (.setHeight50) (.setFillColor/RED)))))) (.setVisibletrue))) (javafxapp) 33
  • 36. Refined Clojure GUI Example (defnjavafxapp [] (doto(Stage. "JavaFX Stage") (.setWidth 600) (.setHeight 450) (.setScene (doto(Scene.) (.setFillColor/LIGHTGREEN) (.setContent (list (doto (Rectangle.) (.setX 25) (.setY 40) (.setWidth 100) (.setHeight 50) (.setFillColor/RED)))))) (.setVisible true))) (javafxapp) 34 Let replaced with inline declarations
  • 37. Refined Clojure GUI Example (defnjavafxapp [] (doto (Stage. "JavaFX Stage") (.setWidth 600) (.setHeight 450) (.setScene (doto (Scene.) (.setFillColor/LIGHTGREEN) (.setContent (list (doto (Rectangle.) (.setX 25) (.setY 40) (.setWidth 100) (.setHeight 50) (.setFillColor/RED)))))) (.setVisible true))) (javafxapp) 35 Doto allows nested data structures
  • 38. Refined Clojure GUI Example (defnjavafxapp [] (doto (Stage. "JavaFX Stage") (.setWidth 600) (.setHeight 450) (.setScene (doto (Scene.) (.setFillColor/LIGHTGREEN) (.setContent (list (doto (Rectangle.) (.setX 25) (.setY 40) (.setWidth 100) (.setHeight 50) (.setFillColor/RED)))))) (.setVisible true))) (javafxapp) 36 Now a nested Rectangle fits!
  • 39. Closures in Clojure 37 Inner classes can be created using proxy (.addListenerhoverProperty (proxy[ChangeListener] [] (handle [p, o, v] (.setFillrect (if (.isHoverrect) Color/GREEN Color/RED)))))
  • 40. Closures in Clojure Inner classes can be created using proxy 38 Proxy form: (proxy [class] [args] fs+) f => (name [params*] body) (.addListenerhoverProperty (proxy[ChangeListener][] (handle [p, o, v] (.setFillrect (if (.isHoverrect) Color/GREEN Color/RED)))))
  • 42. Features of Groovy Tight integration with Java Very easy to port from Java to Groovy Declarative syntax Familiar to JavaFX Script developers Builders
  • 43. Example 1: Simple FX Script to Groovy
  • 44. Step 1: Lazy conversion to Groovy class HelloStage extends Application { void start(stage) { stage.setTitle("Hello Stage (Groovy)“); stage.setWidth(600); stage.setHeight(450); Scene scene = new Scene(); scene.setFill(Color.LIGHTSKYBLUE); stage.setScene(scene); stage.setVisible(true); } static void main(args) { Launcher.launch(HelloStage.class, args); } }
  • 45. Step 2: Slightly More Groovy class HelloStage extends Application { void start(stage) { new Stage( title: "Hello Stage (Groovy)", width: 600, height: 450, visible: true, scene: new Scene( fill: Color.LIGHTSKYBLUE, ) ); } static void main(args) { Launcher.launch(HelloStage.class, args); } }
  • 46. Slight Aside: Groovy Builders Groovy builders make writing custom DSLs easy For the next slide, I am using a builder I defined Hopefully the community will improve upon this
  • 47. Step 3: Using a Groovy Builder FxBuilder.build { stage = stage( title: "Hello World", width: 600, height: 450, scene: scene(fill: Color.LIGHTSKYBLUE) { ... } ) stage.visible = true; }
  • 48. Step 4: With Content FxBuilder.build { stage = stage( title: "Hello Rectangle (Groovy FxBuilder 2)", width: 600, height: 450, scene: scene(fill: Color.LIGHTSKYBLUE) { rectangle( x: 25, y: 40, width: 100, height: 50, fill: Color.RED ) } ) stage.visible = true; }
  • 49. Example 2: FX Script Animation in Groovy
  • 50. Step 1: JavaFX Script def timeline = Timeline { repeatCount: Timeline.INDEFINITE autoReverse: true keyFrames: [ KeyFrame { time: 750ms values : [ rect1.x => 200.0 tweenInterpolator.LINEAR, rect2.y => 200.0 tweenInterpolator.LINEAR, circle1.radius => 200.0 tweenInterpolator.LINEAR ] } ]; } timeline.play();
  • 51. Step 1a: JavaFX Script Simplification def timeline = Timeline { repeatCount: Timeline.INDEFINITE autoReverse: true keyFrames: at (750ms) { rect1.x => 200.0 tween Interpolator.LINEAR; rect2.y => 200.0 tween Interpolator.LINEAR; circle1.radius => 200.0 tween Interpolator.LINEAR; } } timeline.play();
  • 52. Step 2: Java-ish Groovy Animations final Timeline timeline = new Timeline( repeatCount: Timeline.INDEFINITE, autoReverse: true ) final KeyValue kv1 = new KeyValue (rect1.x(), 200); final KeyValue kv2 = new KeyValue (rect2.y(), 200); final KeyValue kv3 = new KeyValue (circle1.radius(), 200); final KeyFramekf = new KeyFrame(Duration.valueOf(750), kv1, kv2, kv3); timeline.getKeyFrames().add(kf); timeline.play();
  • 53. Step 3: JavaFX Animation Groovy DSL (courtesy of Jim Clarke – work in progress) timeline = timeline(repeatCount: Timeline.INDEFINITE, autoReverse: true) { at 750.ms update values { change rect1.y() to 200 change rect2.x() to 200 change circle.radius() to 200 } } timeline.play();
  • 54. Groovy Closures - With interface coercion def f = { p, o, v -> rect.setFill(rect.isHover() ? Color.GREEN : Color.RED); } as ChangeListener; rect.hoverProperty().addListener(f);
  • 55. 53 JavaFX With Scala
  • 56. What is Scala Started in 2001 by Martin Odersky Compiles to Java bytecodes Pure object-oriented language Also a functional programming language 54
  • 57. Why Scala? Shares many language features with JavaFX Script that make GUI programming easier: Static type checking – Catch your errors at compile time Closures – Wrap behavior and pass it by reference Declarative – Express the UI by describing what it should look like Scala also supports DSLs! 55
  • 58. Java vs. Scala DSL public class HelloStage extends Application { public void start(Stage stage) { stage.setTitle("Hello Stage"); stage.setWidth(600); stage.setHeight(450); Scene scene = new Scene(); scene.setFill(Color.LIGHTGREEN); Rectangle rect = new Rectangle(); rect.setX(25); rect.setY(40); rect.setWidth(100); rect.setHeight(50); rect.setFill(Color.RED); stage.add(rect); stage.setScene(scene); stage.setVisible(true); } public static void main(String[] args) { Launcher.launch(HelloStage.class, args); } } object HelloJavaFX extends JavaFXApplication { def stage = new Stage { title = "Hello Stage" width = 600 height = 450 scene = new Scene { fill = Color.LIGHTGREEN content = List(new Rectangle { x = 25 y = 40 width = 100 height = 50 fill = Color.RED }) } } } 56 21 Lines 541 Characters 17 Lines 324 Characters
  • 59. object HelloJavaFX extends JavaFXApplication { def stage = new Stage { title = "Hello Stage" width = 600 height = 450 scene = new Scene { fill = Color.LIGHTGREEN content = List(new Rectangle { x = 25 y = 40 width = 100 height = 50 fill = Color.RED }) } } } 57
  • 60. 58 object HelloJavaFX extends JavaFXApplication { def stage = new Stage { title = "Hello Stage" width = 600 height = 450 scene = new Scene { fill = Color.LIGHTGREEN content = List(new Rectangle { x = 25 y = 40 width = 100 height = 50 fill = Color.RED }) } } } object HelloJavaFX extends JavaFXApplication { def stage = new Stage { title = "Hello Stage" width = 600 height = 450 scene = new Scene { fill = Color.LIGHTGREEN content = List(new Rectangle { x = 25 y = 40 width = 100 height = 50 fill = Color.RED }) } } } Base class for JavaFX applications
  • 61. 59 object HelloJavaFX extends JavaFXApplication { def stage = new Stage { title = "Hello Stage" width = 600 height = 450 scene = new Scene { fill = Color.LIGHTGREEN content = List(new Rectangle { x = 25 y = 40 width = 100 height = 50 fill = Color.RED }) } } } Declarative Stage definition
  • 62. 60 object HelloJavaFX extends JavaFXApplication { def stage = new Stage { title = "Hello Stage" width = 600 height = 450 scene = new Scene { fill = Color.LIGHTGREEN content = List(new Rectangle { x = 25 y = 40 width = 100 height = 50 fill = Color.RED }) } } } Inline property definitions
  • 63. 61 object HelloJavaFX extends JavaFXApplication { def stage = new Stage { title = "Hello Stage" width = 600 height = 450 scene = new Scene { fill = Color.LIGHTGREEN content = List(new Rectangle { x = 25 y = 40 width = 100 height = 50 fill = Color.RED }) } } } List Construction Syntax
  • 64. Animation in Scala def timeline = new Timeline { repeatCount = INDEFINITE autoReverse = true keyFrames = List( new KeyFrame(time: 50) { values = List( new KeyValue(rect1.x() -> 300), new KeyValue(rect2.y() -> 500), new KeyValue(rect2.width() -> 150) ) } ) } 62
  • 65. def timeline = new Timeline { repeatCount = INDEFINITE autoReverse = true keyFrames = List( new KeyFrame(time: 50) { values = List( new KeyValue(rect1.x() -> 300), new KeyValue(rect2.y() -> 500), new KeyValue(rect2.width() -> 150) ) } ) } Animation in Scala 63 Duration set by Constructor Parameter
  • 66. Animation in Scala 64 def timeline = new Timeline { repeatCount = INDEFINITE autoReverse = true keyFrames = List( new KeyFrame(time: 50) { values = List( new KeyValue(rect1.x() -> 300), new KeyValue(rect2.y() -> 500), new KeyValue(rect2.width() -> 150) ) } ) } Operator overloading for animation syntax
  • 67. Closures in Scala 65 Closures are also supported in Scala And they are 100% type-safe rect.hoverProperty().addListener((p, o, v) => { rect.fill = if (rect.hover) Color.GREEN else Color.RED })
  • 68. Closures in Scala Closures are also supported in Scala And they are 100% type-safe 66 rect.hoverProperty().addListener((p, o, v) => { rect.fill = if (rect.hover) Color.GREEN else Color.RED }) Compact syntax (params) => {body}
  • 69. Other JVM Languages to Try Jython Started by Jim Hugunin High Performance Python Mirah Invented by Charles Nutter Originally called Duby Local Type Inference, Static and Dynamic Typing Fantom Created by Brian and Andy Frank Originally called Fan Built-in Declarative Syntax Portable to Java and .NET Local Type Inference, Static and Dynamic Typing 67
  • 70. Fantom Code Example Void main() { Stage { title= "Hello Stage" width= 600 height= 450 Scene { fill= Color.LIGHTGREEN Rectangle { x= 25 y= 40 width= 100 height= 50 fill= Color.RED } } }.open } 68
  • 71. timeline := Timeline { repeatCount = Timeline.INDEFINITE autoReverse = true KeyFrame { time = 50ms KeyValue(rect1.x()-> 300), KeyValue(rect2.y() -> 500), KeyValue(rect2.width() -> 150) } } Animation in Fantom 69 Fantom has a built-in Duration type And also supports operator overloading
  • 72.
  • 73. How about JavaFX on… Visage Stage { title: "Hello Stage" width: 600 height: 450 scene: Scene { fill: Color.LIGHTGREEN content: Rectangle { x: 25 y: 40 width: 100 height: 50 fill: Color.RED } } } 71
  • 74. How about JavaFX on… Visage Stage { title: "Hello Stage" width: 600 height: 450 scene: Scene { fill: Color.LIGHTGREEN content: Rectangle { x: 25 y: 40 width: 100 height: 50 fill: Color.RED } } } 72
  • 75. How about JavaFX on… Visage Stage { title: "Hello Stage" width: 600 height: 450 Scene { fill: Color.LIGHTGREEN Rectangle { x: 25 y: 40 width: 100 height: 50 fill: Color.RED } } } 73
  • 76. Conclusion You can write JavaFX applications in pure Java JavaFX is also usable in alternate languages Over time improved support is possible Groovy Builders, Scala DSL, Visage Remember: This is a proof of concept only – you can not leave this session and do this today.
  • 77. JavaFX 2.0 Product Timeline CYQ1 2011 CYQ3 2011 CYQ2 2011 JavaFX 2.0 EA (Early Access) JavaFX 2.0 Beta JavaFX 2.0 GA (General Availability) Copyright 2010 Oracle JavaFX Beta in Late May!
  • 78. Pro JavaFX 2 Platform Coming Soon! Coming 2nd half of this year All examples rewritten in Java Will cover the new JavaFX 2.0 APIs 76
  • 79. 77 Stephen Chin steveonjava@gmail.com tweet: @steveonjava

Hinweis der Redaktion

  1. There are two kinds of listener: ‘changedListener’ and ‘ChangingListener’. Being informed of the change before it happens allow for it to be vetoed.It is also possible to either watch a single property, or all properties belonging to a bean.Note that the value passed to the callback is the old value. This is to ensure that we aren’t eagerly computing the new value when it might not be required. To get the new value, you can call the function on the bean or via the propertyReference
  2. There are two kinds of listener: ‘changedListener’ and ‘ChangingListener’. Being informed of the change before it happens allow for it to be vetoed.It is also possible to either watch a single property, or all properties belonging to a bean.Note that the value passed to the callback is the old value. This is to ensure that we aren’t eagerly computing the new value when it might not be required. To get the new value, you can call the function on the bean or via the propertyReference
  3. There are two kinds of listener: ‘changedListener’ and ‘ChangingListener’. Being informed of the change before it happens allow for it to be vetoed.It is also possible to either watch a single property, or all properties belonging to a bean.Note that the value passed to the callback is the old value. This is to ensure that we aren’t eagerly computing the new value when it might not be required. To get the new value, you can call the function on the bean or via the propertyReference
  4. There are two kinds of listener: ‘changedListener’ and ‘ChangingListener’. Being informed of the change before it happens allow for it to be vetoed.It is also possible to either watch a single property, or all properties belonging to a bean.Note that the value passed to the callback is the old value. This is to ensure that we aren’t eagerly computing the new value when it might not be required. To get the new value, you can call the function on the bean or via the propertyReference
  5. There are two kinds of listener: ‘changedListener’ and ‘ChangingListener’. Being informed of the change before it happens allow for it to be vetoed.It is also possible to either watch a single property, or all properties belonging to a bean.Note that the value passed to the callback is the old value. This is to ensure that we aren’t eagerly computing the new value when it might not be required. To get the new value, you can call the function on the bean or via the propertyReference
  6. There are two kinds of listener: ‘changedListener’ and ‘ChangingListener’. Being informed of the change before it happens allow for it to be vetoed.It is also possible to either watch a single property, or all properties belonging to a bean.Note that the value passed to the callback is the old value. This is to ensure that we aren’t eagerly computing the new value when it might not be required. To get the new value, you can call the function on the bean or via the propertyReference
  7. Slight conversion to Groovy. This can be compiled by the Groovy compiler and run, but basically there is only one line difference (the ‘static void main’ line)
  8. This is the same code as the previous slide, taking advantage of some of the Groovy syntax tricks. This is getting to look a lot more like JavaFX Script.
  9. This DSL handles running on the EDT, and can actually be run as-is – there is no need for a class declaration, or anything else to ensure that we’re on the EDT. This is getting us fairly close to the simple JavaFX Script at the beginning
  10. This DSL handles running on the EDT, and can actually be run as-is – there is no need for a class declaration, or anything else to ensure that we’re on the EDT. This is getting us fairly close to the simple JavaFX Script at the beginning