SlideShare una empresa de Scribd logo
1 de 26
Descargar para leer sin conexión
GroovyFX
                         or
            How to Program JavaFX Easily

                                 Prof Russel Winder
                                  http://www.russel.org.uk

                                  email: russel@winder.org.uk
                                 xmpp: russel@winder.org.uk
                                    twitter: @russel_winder


Copyright © 2013 Russel Winder                                  1
Interstitial Advertisement




                                                     ?

Copyright © 2013 Russel Winder                           2
Java
   AWT

   Applets




Copyright © 2013 Russel Winder   3
Copyright © 2013 Russel Winder   4
Interregnum

   Java server-side only




Copyright © 2013 Russel Winder   5
Flex

                                 Silverlight




Copyright © 2013 Russel Winder                 6
Copyright © 2013 Russel Winder   7
JavaFX




Copyright © 2013 Russel Winder   8
JavaFX Script
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.text.Font;
    import javafx.scene.text.Text;

    Stage {
      title: "Hello World"
      width: 250
      height: 80
      scene: Scene {
        content: Text {
          font: Font {
            size: 24
          }
          x: 10, y: 30
          content: "Hello World."
        }
      }
    }                                    http://en.wikipedia.org/wiki/JavaFX_Script
Copyright © 2013 Russel Winder                                                        9
Historical Context
     ●   JavaFX                           ●   Compete against:
          ●    RIA framework                  ●   Flex
                –   JavaME                    ●   Silverlight
                –   JavaSE
          ●    JavaFX Script




Copyright © 2013 Russel Winder                                   10
JavaFX didn't really catch on…




Copyright © 2013 Russel Winder                        11
…despite JavaFX Script.




Copyright © 2013 Russel Winder                             12
Copyright © 2013 Russel Winder   13
Graphics Frameworks

     ●   GTK, GObject:
          ●    Glade                       ●   Qt:
                                               ●   Qt Designer
                                               ●   Qt Quick/QML
     ●   wxWidgets:
          ●    wxGlade



Copyright © 2013 Russel Winder                                    14
The New JavaFX
     ●   JavaFX 2:
          ●    Java API for Java SE.
          ●    Eventually a replacement for Swing.
     ●   SceneBuilder
     ●   FXML




                                            JavaFX == JavaFX 2
Copyright © 2013 Russel Winder                                   15
import javafx.application.Application;
                           import javafx.scene.Group;
                           import javafx.scene.Scene;
                           import javafx.stage.Stage;
                           Import javafx.scene.paint.Color;
                           import javafx.scene.text.Font;
                           import javafx.scene.text.Text;

                           public class HelloWorld extends Application {
                            @Override
                            public void start(final Stage stage) {
                              stage.setTitle("Hello World");
                              final Group rootNode = new Group();
                              final Text textNode = new Text(10, 30, "Hello World.");
                              textNode.setFont(Font.font("Ocean Sans MT", 24));
                              rootNode.getChildren().add(textNode);
                              final Scene sceneNode = new Scene(rootNode, 250, 80);
                              sceneNode.setFill(Color.web(“#d0c4b0”));
                              stage.setScene(sceneNode);
                              stage.show();
                            }

                               public static void main(final String[] args) {
                                 launch(args);
                               }
                           }
Copyright © 2013 Russel Winder                                                          16
No JavaFX Script




Copyright © 2013 Russel Winder                      17
Groovy




Copyright © 2013 Russel Winder   18
Jim Clark
   Dean Iverson
   Dierk König
   Andres Almiray
   Russel Winder




Copyright © 2013 Russel Winder   19
GroovyFX

           import static groovyfx.javafx.GroovyFX.start

           import javafx.scene.paint.Color

           start {
             stage title: 'Hello World', visible: true, {
               scene width: 250, height: 80, fill: Color.web('#d0c4b0'), {
                 text x: 10, y: 30, text: 'Hello World.', font: '24pt "Ocean Sans MT"'
               }
             }
           }



Copyright © 2013 Russel Winder                                                           20
Real
   Code


                                 http://nighthacking.com
Copyright © 2013 Russel Winder                             21
Having Good Architectures
     ●   Separate concerns.         ●   Code for structure and
     ●   MVC (model, view               logic.
         controller), MVP (model    ●   CSS (cascading style
         view presenter).               sheets) for presentation.
     ●   Mediator.
     ●   Façade.




Copyright © 2013 Russel Winder                                      22
More code…




Copyright © 2013 Russel Winder                23
http://griffon.codehaus.org/

Copyright © 2013 Russel Winder                                  24
Interstitial Advertisement




                                                     ?

Copyright © 2013 Russel Winder                           25
GroovyFX
                         or
            How to Program JavaFX Easily

                                 Prof Russel Winder
                                  http://www.russel.org.uk

                                  email: russel@winder.org.uk
                                 xmpp: russel@winder.org.uk
                                    twitter: @russel_winder


Copyright © 2013 Russel Winder                                  26

Más contenido relacionado

Similar a GroovyFX: or how to program JavaFX easily

Java is dead, long live Scala Kotlin Ceylon etc.
Java is dead, long live Scala Kotlin Ceylon etc.Java is dead, long live Scala Kotlin Ceylon etc.
Java is dead, long live Scala Kotlin Ceylon etc.Russel Winder
 
JavaFX / JacpFX interaction with JSR356 WebSockets
JavaFX / JacpFX interaction with JSR356 WebSocketsJavaFX / JacpFX interaction with JSR356 WebSockets
JavaFX / JacpFX interaction with JSR356 WebSocketsAndy Moncsek
 
Java is dead, long live Scala, Kotlin, Ceylon, etc.
Java is dead, long live Scala, Kotlin, Ceylon, etc.Java is dead, long live Scala, Kotlin, Ceylon, etc.
Java is dead, long live Scala, Kotlin, Ceylon, etc.Russel Winder
 
Visage Android Hands-on Lab (OSCON)
Visage Android Hands-on Lab (OSCON)Visage Android Hands-on Lab (OSCON)
Visage Android Hands-on Lab (OSCON)Stephen Chin
 
Node JS reverse shell
Node JS reverse shellNode JS reverse shell
Node JS reverse shellMadhu Akula
 
Java is Dead, Long Live Ceylon, Kotlin, etc
Java is Dead,  Long Live Ceylon, Kotlin, etcJava is Dead,  Long Live Ceylon, Kotlin, etc
Java is Dead, Long Live Ceylon, Kotlin, etcRussel Winder
 
JRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell YouJRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell Youelliando dias
 
Proxy deep-dive java-one_20151027_001
Proxy deep-dive java-one_20151027_001Proxy deep-dive java-one_20151027_001
Proxy deep-dive java-one_20151027_001Sven Ruppert
 
.NET Coding Standards For The Real World (2012)
.NET Coding Standards For The Real World (2012).NET Coding Standards For The Real World (2012)
.NET Coding Standards For The Real World (2012)David McCarter
 
Quarkus Denmark 2019
Quarkus Denmark 2019Quarkus Denmark 2019
Quarkus Denmark 2019Max Andersen
 
Polyglot Alchemy : JSR 223 In Action
Polyglot Alchemy : JSR 223 In ActionPolyglot Alchemy : JSR 223 In Action
Polyglot Alchemy : JSR 223 In Actionfabricematrat
 
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScriptThe Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScriptHazelcast
 
Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1rajivmordani
 
Spocktacular testing
Spocktacular testingSpocktacular testing
Spocktacular testingRussel Winder
 
2013 05-multicloud-paas-interop-scenarios-fia-dublin
2013 05-multicloud-paas-interop-scenarios-fia-dublin2013 05-multicloud-paas-interop-scenarios-fia-dublin
2013 05-multicloud-paas-interop-scenarios-fia-dublinAlex Heneveld
 

Similar a GroovyFX: or how to program JavaFX easily (20)

Java is dead, long live Scala Kotlin Ceylon etc.
Java is dead, long live Scala Kotlin Ceylon etc.Java is dead, long live Scala Kotlin Ceylon etc.
Java is dead, long live Scala Kotlin Ceylon etc.
 
JavaFX / JacpFX interaction with JSR356 WebSockets
JavaFX / JacpFX interaction with JSR356 WebSocketsJavaFX / JacpFX interaction with JSR356 WebSockets
JavaFX / JacpFX interaction with JSR356 WebSockets
 
Java is dead, long live Scala, Kotlin, Ceylon, etc.
Java is dead, long live Scala, Kotlin, Ceylon, etc.Java is dead, long live Scala, Kotlin, Ceylon, etc.
Java is dead, long live Scala, Kotlin, Ceylon, etc.
 
Visage Android Hands-on Lab (OSCON)
Visage Android Hands-on Lab (OSCON)Visage Android Hands-on Lab (OSCON)
Visage Android Hands-on Lab (OSCON)
 
Node JS reverse shell
Node JS reverse shellNode JS reverse shell
Node JS reverse shell
 
Visage fx
Visage fxVisage fx
Visage fx
 
Java is Dead, Long Live Ceylon, Kotlin, etc
Java is Dead,  Long Live Ceylon, Kotlin, etcJava is Dead,  Long Live Ceylon, Kotlin, etc
Java is Dead, Long Live Ceylon, Kotlin, etc
 
JavaFX Overview
JavaFX OverviewJavaFX Overview
JavaFX Overview
 
JRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell YouJRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell You
 
Proxy deep-dive java-one_20151027_001
Proxy deep-dive java-one_20151027_001Proxy deep-dive java-one_20151027_001
Proxy deep-dive java-one_20151027_001
 
.NET Coding Standards For The Real World (2012)
.NET Coding Standards For The Real World (2012).NET Coding Standards For The Real World (2012)
.NET Coding Standards For The Real World (2012)
 
Quarkus Denmark 2019
Quarkus Denmark 2019Quarkus Denmark 2019
Quarkus Denmark 2019
 
JRuby Basics
JRuby BasicsJRuby Basics
JRuby Basics
 
Polyglot Alchemy : JSR 223 In Action
Polyglot Alchemy : JSR 223 In ActionPolyglot Alchemy : JSR 223 In Action
Polyglot Alchemy : JSR 223 In Action
 
React, Flux and a little bit of Redux
React, Flux and a little bit of ReduxReact, Flux and a little bit of Redux
React, Flux and a little bit of Redux
 
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScriptThe Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
 
Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1
 
Spocktacular testing
Spocktacular testingSpocktacular testing
Spocktacular testing
 
2013 05-multicloud-paas-interop-scenarios-fia-dublin
2013 05-multicloud-paas-interop-scenarios-fia-dublin2013 05-multicloud-paas-interop-scenarios-fia-dublin
2013 05-multicloud-paas-interop-scenarios-fia-dublin
 
Jigsaw modularity
Jigsaw modularityJigsaw modularity
Jigsaw modularity
 

Más de Russel Winder

On Concurrency and Parallelism in the JVMverse
On Concurrency and Parallelism in the JVMverseOn Concurrency and Parallelism in the JVMverse
On Concurrency and Parallelism in the JVMverseRussel Winder
 
The Case for Kotlin and Ceylon
The Case for Kotlin and CeylonThe Case for Kotlin and Ceylon
The Case for Kotlin and CeylonRussel Winder
 
On the Architectures of Microservices: the next layer
On the Architectures of Microservices: the next layerOn the Architectures of Microservices: the next layer
On the Architectures of Microservices: the next layerRussel Winder
 
Fast Python? Don't Bother
Fast Python? Don't BotherFast Python? Don't Bother
Fast Python? Don't BotherRussel Winder
 
Making Python computations fast
Making Python computations fastMaking Python computations fast
Making Python computations fastRussel Winder
 
Tales from the Workshops
Tales from the WorkshopsTales from the Workshops
Tales from the WorkshopsRussel Winder
 
Making Computations Execute Very Quickly
Making Computations Execute Very QuicklyMaking Computations Execute Very Quickly
Making Computations Execute Very QuicklyRussel Winder
 
Spocktacular Testing
Spocktacular TestingSpocktacular Testing
Spocktacular TestingRussel Winder
 
Is Groovy static or dynamic
Is Groovy static or dynamicIs Groovy static or dynamic
Is Groovy static or dynamicRussel Winder
 
Dataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you needDataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you needRussel Winder
 
Are Go and D threats to Python
Are Go and D threats to PythonAre Go and D threats to Python
Are Go and D threats to PythonRussel Winder
 
Is Groovy as fast as Java
Is Groovy as fast as JavaIs Groovy as fast as Java
Is Groovy as fast as JavaRussel Winder
 
Who needs C++ when you have D and Go
Who needs C++ when you have D and GoWho needs C++ when you have D and Go
Who needs C++ when you have D and GoRussel Winder
 
Why Go is an important programming language
Why Go is an important programming languageWhy Go is an important programming language
Why Go is an important programming languageRussel Winder
 
GPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for JavaGPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for JavaRussel Winder
 
Switch to Python 3…now…immediately
Switch to Python 3…now…immediatelySwitch to Python 3…now…immediately
Switch to Python 3…now…immediatelyRussel Winder
 
Given Groovy Who Needs Java
Given Groovy Who Needs JavaGiven Groovy Who Needs Java
Given Groovy Who Needs JavaRussel Winder
 

Más de Russel Winder (20)

On Concurrency and Parallelism in the JVMverse
On Concurrency and Parallelism in the JVMverseOn Concurrency and Parallelism in the JVMverse
On Concurrency and Parallelism in the JVMverse
 
The Case for Kotlin and Ceylon
The Case for Kotlin and CeylonThe Case for Kotlin and Ceylon
The Case for Kotlin and Ceylon
 
On the Architectures of Microservices: the next layer
On the Architectures of Microservices: the next layerOn the Architectures of Microservices: the next layer
On the Architectures of Microservices: the next layer
 
Fast Python? Don't Bother
Fast Python? Don't BotherFast Python? Don't Bother
Fast Python? Don't Bother
 
Making Python computations fast
Making Python computations fastMaking Python computations fast
Making Python computations fast
 
Tales from the Workshops
Tales from the WorkshopsTales from the Workshops
Tales from the Workshops
 
Making Computations Execute Very Quickly
Making Computations Execute Very QuicklyMaking Computations Execute Very Quickly
Making Computations Execute Very Quickly
 
GPars Remoting
GPars RemotingGPars Remoting
GPars Remoting
 
GPars 2014
GPars 2014GPars 2014
GPars 2014
 
Spocktacular Testing
Spocktacular TestingSpocktacular Testing
Spocktacular Testing
 
Is Groovy static or dynamic
Is Groovy static or dynamicIs Groovy static or dynamic
Is Groovy static or dynamic
 
Dataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you needDataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you need
 
Are Go and D threats to Python
Are Go and D threats to PythonAre Go and D threats to Python
Are Go and D threats to Python
 
Is Groovy as fast as Java
Is Groovy as fast as JavaIs Groovy as fast as Java
Is Groovy as fast as Java
 
Who needs C++ when you have D and Go
Who needs C++ when you have D and GoWho needs C++ when you have D and Go
Who needs C++ when you have D and Go
 
Why Go is an important programming language
Why Go is an important programming languageWhy Go is an important programming language
Why Go is an important programming language
 
GPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for JavaGPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for Java
 
Switch to Python 3…now…immediately
Switch to Python 3…now…immediatelySwitch to Python 3…now…immediately
Switch to Python 3…now…immediately
 
GPars Workshop
GPars WorkshopGPars Workshop
GPars Workshop
 
Given Groovy Who Needs Java
Given Groovy Who Needs JavaGiven Groovy Who Needs Java
Given Groovy Who Needs Java
 

Último

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 

Último (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

GroovyFX: or how to program JavaFX easily

  • 1. GroovyFX or How to Program JavaFX Easily Prof Russel Winder http://www.russel.org.uk email: russel@winder.org.uk xmpp: russel@winder.org.uk twitter: @russel_winder Copyright © 2013 Russel Winder 1
  • 2. Interstitial Advertisement ? Copyright © 2013 Russel Winder 2
  • 3. Java AWT Applets Copyright © 2013 Russel Winder 3
  • 4. Copyright © 2013 Russel Winder 4
  • 5. Interregnum Java server-side only Copyright © 2013 Russel Winder 5
  • 6. Flex Silverlight Copyright © 2013 Russel Winder 6
  • 7. Copyright © 2013 Russel Winder 7
  • 8. JavaFX Copyright © 2013 Russel Winder 8
  • 9. JavaFX Script import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.text.Font; import javafx.scene.text.Text; Stage { title: "Hello World" width: 250 height: 80 scene: Scene { content: Text { font: Font { size: 24 } x: 10, y: 30 content: "Hello World." } } } http://en.wikipedia.org/wiki/JavaFX_Script Copyright © 2013 Russel Winder 9
  • 10. Historical Context ● JavaFX ● Compete against: ● RIA framework ● Flex – JavaME ● Silverlight – JavaSE ● JavaFX Script Copyright © 2013 Russel Winder 10
  • 11. JavaFX didn't really catch on… Copyright © 2013 Russel Winder 11
  • 12. …despite JavaFX Script. Copyright © 2013 Russel Winder 12
  • 13. Copyright © 2013 Russel Winder 13
  • 14. Graphics Frameworks ● GTK, GObject: ● Glade ● Qt: ● Qt Designer ● Qt Quick/QML ● wxWidgets: ● wxGlade Copyright © 2013 Russel Winder 14
  • 15. The New JavaFX ● JavaFX 2: ● Java API for Java SE. ● Eventually a replacement for Swing. ● SceneBuilder ● FXML JavaFX == JavaFX 2 Copyright © 2013 Russel Winder 15
  • 16. import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.stage.Stage; Import javafx.scene.paint.Color; import javafx.scene.text.Font; import javafx.scene.text.Text; public class HelloWorld extends Application { @Override public void start(final Stage stage) { stage.setTitle("Hello World"); final Group rootNode = new Group(); final Text textNode = new Text(10, 30, "Hello World."); textNode.setFont(Font.font("Ocean Sans MT", 24)); rootNode.getChildren().add(textNode); final Scene sceneNode = new Scene(rootNode, 250, 80); sceneNode.setFill(Color.web(“#d0c4b0”)); stage.setScene(sceneNode); stage.show(); } public static void main(final String[] args) { launch(args); } } Copyright © 2013 Russel Winder 16
  • 17. No JavaFX Script Copyright © 2013 Russel Winder 17
  • 18. Groovy Copyright © 2013 Russel Winder 18
  • 19. Jim Clark Dean Iverson Dierk König Andres Almiray Russel Winder Copyright © 2013 Russel Winder 19
  • 20. GroovyFX import static groovyfx.javafx.GroovyFX.start import javafx.scene.paint.Color start { stage title: 'Hello World', visible: true, { scene width: 250, height: 80, fill: Color.web('#d0c4b0'), { text x: 10, y: 30, text: 'Hello World.', font: '24pt "Ocean Sans MT"' } } } Copyright © 2013 Russel Winder 20
  • 21. Real Code http://nighthacking.com Copyright © 2013 Russel Winder 21
  • 22. Having Good Architectures ● Separate concerns. ● Code for structure and ● MVC (model, view logic. controller), MVP (model ● CSS (cascading style view presenter). sheets) for presentation. ● Mediator. ● Façade. Copyright © 2013 Russel Winder 22
  • 23. More code… Copyright © 2013 Russel Winder 23
  • 25. Interstitial Advertisement ? Copyright © 2013 Russel Winder 25
  • 26. GroovyFX or How to Program JavaFX Easily Prof Russel Winder http://www.russel.org.uk email: russel@winder.org.uk xmpp: russel@winder.org.uk twitter: @russel_winder Copyright © 2013 Russel Winder 26