SlideShare a Scribd company logo
1 of 23
Download to read offline
JavaFX goes Scala
 Farewell JavaFX Script
       Andreas Schosser
Changes in GUI development
Conventional GUIs
                         • Often designed by a
                           software engineer
                         • Usage of common
                           widgets / controls
                         • Customized by skins
                           / CSS
Developer +              • Supported by
WindowBuilder              toolkits like Swing
Modern GUIs
                    • Often designed by a
                      graphics designer
                    • Usage of individual
                      widgets / controls
                    • Designed from soup
                      to nuts
Designer +          • Supported by
Illustrator           toolkits like JavaFX
The difference




Designer +                       Developer +
Illustrator                    WindowBuilder
Why are designers important?




Designer +                   Developer +
Illustrator                    Illustrator
What makes the difference …
Designers ….         Developers …

• … describe a new   • … reuse existing
  interface            patterns

• … focus on         • … focus on
  appearance           functionality
The JavaFX 2.0 API
Pure Java API
Java API including JavaFX 1.3 features
• Data-Binding
• Charts and diagrams
• Bitmap-Effects
• Animation
                                      Focus on
                                   Functionality
JavaFX Script => Java
"JavaFX 2.0" == "Swing 2.0" ?
    • Swing-like controls
    • Programmatic initialization:
      common construction + alignment
    • Swing interoperability
                          […]
                          Scene scene = new Scene(stage);
                          scene.setWidth(800);
                          scene.setHeight(600);
Existing                  Label label = new Label(scene);
                          label.setText("Welcome");
patterns                  scene.add(label);
                          […]
Why another language?
• Design-related domain
• Interoperability with design tools
  (e.g. Adobe Illustrator)
• Independence from devices

                                         Focus on
                                       Appearance
The GUI language
    • Intuitive placement
    • Mapping source-code with
      layout definitions
    • Innovative controls […]
                         scene = new Scene {
                             width = 800
                             height = 600
                             content = new Content {
Describe a                     label = new Label {
                                  text = "Welcome"
new interface                  }
                        […]
Java and GUI language
GUI language does …. Java does …

• … describe a new   • … reuse existing
  interface            patterns

• … focus on         • … focus on
  appearance           functionality
Bringing both worlds together
Translating the GUI-DSL
                               […]
                               Scene scene = new Scene(stage);
                               scene.setWidth(800);
                               scene.setHeight(600);
                               Label label = new Label(scene);
                               label.setText("Welcome");

     GUI                                    API
                               scene.add(label);
                               […]

[…]
    DSL
 scene = new Scene {
     width = 800
                                   JAVA
     height = 600
     content = new Content {                          GUI-DSL
       label = new Label {                         to Java API
          text = "Welcome"
       }
[…]
Learning from JavaFX Script
    •   Focus on appearance
    •   Concise definitions
    •   Usage of Mixins
    •   Transparent Java integration

Good old
JavaFX Script
The Visage Project
• Unofficial successor to JavaFX Script
• Open Source Project
• Founded by
  JavaFX Expert Stephen Chin

                                   The unofficial
                                     successor
Scala as DSL technology
     • Established DSL-technology
     • Runs on Android
     • Static Type Checking
          => Performance


Reasons
for Scala
Transformation example
                                       […]
                                       Label label = new Label(scene);
                                       label.setText(“Hello JavaFX Script");
                                       scene.add(label);
                                       […]
           […]
           def node = "new" ~> nodeType ^^ type => {
           if ("Label" == type) {
               new JLabel()
           }
           […]
[…]
label = new Label {
   text = "Hello JavaFX„                                          Speaking
}                                                                 Java API
[…]
Which JVM-language?

               Visage   ?            Scala


                                        ?
               ?        JRuby         ?
Flexible
                    ?       Groovy    ?
Integration
Links & Literature
• Roadmap JavaFX
  Official JavaFX Website
• The “Visage“ Project
  Google Code Project
• Der Abschied von JavaFX Script
  Online article 04/2011
Thank you for your attention!
Wir gehören zu den 100 besten Arbeitgebern Deutschlands …




  COINOR bietet allen Mitarbeitern
     Spannende Projekte
     Individuelle Förderung
     Die Möglichkeit, schnell Verantwortung zu übernehmen
     Attraktive Vergütungsmodelle
     Einen motivierenden Teamgeist

… und suchen ein paar der besten Arbeitnehmer!

More Related Content

Viewers also liked

Interactions between students in the classroom
Interactions between students in the classroomInteractions between students in the classroom
Interactions between students in the classroom
Liriett Herrera
 
Tugas bahas inggris neo
Tugas bahas inggris neoTugas bahas inggris neo
Tugas bahas inggris neo
OktaChandra
 
2014 Outlook Call
2014 Outlook Call2014 Outlook Call
2014 Outlook Call
CNOServices
 
การทำโครงงานพัฒนาสื่อเพื่อการศึกษา
การทำโครงงานพัฒนาสื่อเพื่อการศึกษาการทำโครงงานพัฒนาสื่อเพื่อการศึกษา
การทำโครงงานพัฒนาสื่อเพื่อการศึกษา
Khemjira_P
 
Agamben a geniusz
Agamben a geniuszAgamben a geniusz
Agamben a geniusz
sirspeter
 

Viewers also liked (19)

Így szelidítsd a designered! | HWSW App!Mobil 2013 konferencia
Így szelidítsd a designered! | HWSW App!Mobil 2013 konferenciaÍgy szelidítsd a designered! | HWSW App!Mobil 2013 konferencia
Így szelidítsd a designered! | HWSW App!Mobil 2013 konferencia
 
Final electrochemistry
Final electrochemistryFinal electrochemistry
Final electrochemistry
 
Glogster EDU
Glogster EDUGlogster EDU
Glogster EDU
 
IEEE 2014 C# Projects
IEEE 2014 C# ProjectsIEEE 2014 C# Projects
IEEE 2014 C# Projects
 
Resumé EJJ Lemmens
Resumé EJJ LemmensResumé EJJ Lemmens
Resumé EJJ Lemmens
 
Interactions between students in the classroom
Interactions between students in the classroomInteractions between students in the classroom
Interactions between students in the classroom
 
Ноябрь 2014. Обзор бытовых браслетов для непрерывного снятия биосигналов
Ноябрь 2014. Обзор бытовых браслетов для непрерывного снятия биосигналовНоябрь 2014. Обзор бытовых браслетов для непрерывного снятия биосигналов
Ноябрь 2014. Обзор бытовых браслетов для непрерывного снятия биосигналов
 
Tugas bahas inggris neo
Tugas bahas inggris neoTugas bahas inggris neo
Tugas bahas inggris neo
 
biologi umum
biologi umum biologi umum
biologi umum
 
2014 Outlook Call
2014 Outlook Call2014 Outlook Call
2014 Outlook Call
 
การทำโครงงานพัฒนาสื่อเพื่อการศึกษา
การทำโครงงานพัฒนาสื่อเพื่อการศึกษาการทำโครงงานพัฒนาสื่อเพื่อการศึกษา
การทำโครงงานพัฒนาสื่อเพื่อการศึกษา
 
Evaluation 3
Evaluation 3Evaluation 3
Evaluation 3
 
M.Phil Computer Science Cloud Computing Projects
M.Phil Computer Science Cloud Computing ProjectsM.Phil Computer Science Cloud Computing Projects
M.Phil Computer Science Cloud Computing Projects
 
Ozel egitim-video
Ozel egitim-videoOzel egitim-video
Ozel egitim-video
 
Giornale Democratico
Giornale DemocraticoGiornale Democratico
Giornale Democratico
 
Branding & Identity
Branding & IdentityBranding & Identity
Branding & Identity
 
Ozel pilot-okulu
Ozel pilot-okuluOzel pilot-okulu
Ozel pilot-okulu
 
Agamben a geniusz
Agamben a geniuszAgamben a geniusz
Agamben a geniusz
 
Sar1 5 р анги нэгж цахим
Sar1 5 р анги нэгж цахимSar1 5 р анги нэгж цахим
Sar1 5 р анги нэгж цахим
 

Similar to JavaFX goes Scala

Introduction into JavaFX
Introduction into JavaFXIntroduction into JavaFX
Introduction into JavaFX
Eugene Bogaart
 
Javafxpressentation 140524053934-phpapp01 (1)
Javafxpressentation 140524053934-phpapp01 (1)Javafxpressentation 140524053934-phpapp01 (1)
Javafxpressentation 140524053934-phpapp01 (1)
ssuser4f9de3
 
Java chapter 1 basic introduction Unit-1.pptx
Java chapter  1 basic introduction Unit-1.pptxJava chapter  1 basic introduction Unit-1.pptx
Java chapter 1 basic introduction Unit-1.pptx
noosdysharma
 

Similar to JavaFX goes Scala (20)

Java keynote preso
Java keynote presoJava keynote preso
Java keynote preso
 
Java FX 2.0 - A Developer's Guide
Java FX 2.0 - A Developer's GuideJava FX 2.0 - A Developer's Guide
Java FX 2.0 - A Developer's Guide
 
Visage Android Hands-on Lab (OSCON)
Visage Android Hands-on Lab (OSCON)Visage Android Hands-on Lab (OSCON)
Visage Android Hands-on Lab (OSCON)
 
Java fx an introduction
Java fx an introductionJava fx an introduction
Java fx an introduction
 
Visage fx
Visage fxVisage fx
Visage fx
 
Introduction into JavaFX
Introduction into JavaFXIntroduction into JavaFX
Introduction into JavaFX
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
 
Hinkmond's JavaFX Mobile Dojo
Hinkmond's JavaFX Mobile DojoHinkmond's JavaFX Mobile Dojo
Hinkmond's JavaFX Mobile Dojo
 
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
 
Awesome html with ujs, jQuery and coffeescript
Awesome html with ujs, jQuery and coffeescriptAwesome html with ujs, jQuery and coffeescript
Awesome html with ujs, jQuery and coffeescript
 
JavaFX Presentation
JavaFX PresentationJavaFX Presentation
JavaFX Presentation
 
Javafxpressentation 140524053934-phpapp01 (1)
Javafxpressentation 140524053934-phpapp01 (1)Javafxpressentation 140524053934-phpapp01 (1)
Javafxpressentation 140524053934-phpapp01 (1)
 
JavaFX and HTML5 - Like Curds and Rice
JavaFX and HTML5 - Like Curds and RiceJavaFX and HTML5 - Like Curds and Rice
JavaFX and HTML5 - Like Curds and Rice
 
Developing Secure Scala Applications With Fortify For Scala
Developing Secure Scala Applications With Fortify For ScalaDeveloping Secure Scala Applications With Fortify For Scala
Developing Secure Scala Applications With Fortify For Scala
 
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon RitterJava Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
 
Java chapter 1 basic introduction Unit-1.pptx
Java chapter  1 basic introduction Unit-1.pptxJava chapter  1 basic introduction Unit-1.pptx
Java chapter 1 basic introduction Unit-1.pptx
 
Scripting with Java FX - Cédric Tabin - December 2007
Scripting with Java FX - Cédric Tabin - December 2007Scripting with Java FX - Cédric Tabin - December 2007
Scripting with Java FX - Cédric Tabin - December 2007
 
java swing
java swingjava swing
java swing
 
Java1
Java1Java1
Java1
 
Java1
Java1Java1
Java1
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 

JavaFX goes Scala

  • 1. JavaFX goes Scala Farewell JavaFX Script Andreas Schosser
  • 2. Changes in GUI development
  • 3. Conventional GUIs • Often designed by a software engineer • Usage of common widgets / controls • Customized by skins / CSS Developer + • Supported by WindowBuilder toolkits like Swing
  • 4. Modern GUIs • Often designed by a graphics designer • Usage of individual widgets / controls • Designed from soup to nuts Designer + • Supported by Illustrator toolkits like JavaFX
  • 5. The difference Designer + Developer + Illustrator WindowBuilder
  • 6. Why are designers important? Designer + Developer + Illustrator Illustrator
  • 7. What makes the difference … Designers …. Developers … • … describe a new • … reuse existing interface patterns • … focus on • … focus on appearance functionality
  • 9. Pure Java API Java API including JavaFX 1.3 features • Data-Binding • Charts and diagrams • Bitmap-Effects • Animation Focus on Functionality JavaFX Script => Java
  • 10. "JavaFX 2.0" == "Swing 2.0" ? • Swing-like controls • Programmatic initialization: common construction + alignment • Swing interoperability […] Scene scene = new Scene(stage); scene.setWidth(800); scene.setHeight(600); Existing Label label = new Label(scene); label.setText("Welcome"); patterns scene.add(label); […]
  • 11. Why another language? • Design-related domain • Interoperability with design tools (e.g. Adobe Illustrator) • Independence from devices Focus on Appearance
  • 12. The GUI language • Intuitive placement • Mapping source-code with layout definitions • Innovative controls […] scene = new Scene { width = 800 height = 600 content = new Content { Describe a label = new Label { text = "Welcome" new interface } […]
  • 13. Java and GUI language GUI language does …. Java does … • … describe a new • … reuse existing interface patterns • … focus on • … focus on appearance functionality
  • 15. Translating the GUI-DSL […] Scene scene = new Scene(stage); scene.setWidth(800); scene.setHeight(600); Label label = new Label(scene); label.setText("Welcome"); GUI API scene.add(label); […] […] DSL scene = new Scene { width = 800 JAVA height = 600 content = new Content { GUI-DSL label = new Label { to Java API text = "Welcome" } […]
  • 16. Learning from JavaFX Script • Focus on appearance • Concise definitions • Usage of Mixins • Transparent Java integration Good old JavaFX Script
  • 17. The Visage Project • Unofficial successor to JavaFX Script • Open Source Project • Founded by JavaFX Expert Stephen Chin The unofficial successor
  • 18. Scala as DSL technology • Established DSL-technology • Runs on Android • Static Type Checking => Performance Reasons for Scala
  • 19. Transformation example […] Label label = new Label(scene); label.setText(“Hello JavaFX Script"); scene.add(label); […] […] def node = "new" ~> nodeType ^^ type => { if ("Label" == type) { new JLabel() } […] […] label = new Label { text = "Hello JavaFX„ Speaking } Java API […]
  • 20. Which JVM-language? Visage ? Scala ? ? JRuby ? Flexible ? Groovy ? Integration
  • 21. Links & Literature • Roadmap JavaFX Official JavaFX Website • The “Visage“ Project Google Code Project • Der Abschied von JavaFX Script Online article 04/2011
  • 22. Thank you for your attention!
  • 23. Wir gehören zu den 100 besten Arbeitgebern Deutschlands … COINOR bietet allen Mitarbeitern  Spannende Projekte  Individuelle Förderung  Die Möglichkeit, schnell Verantwortung zu übernehmen  Attraktive Vergütungsmodelle  Einen motivierenden Teamgeist … und suchen ein paar der besten Arbeitnehmer!