SlideShare a Scribd company logo
1 of 34
JavaFX 2 Using the Spring Framework
Presented by Stephen Chin <@steveonjava>
 1   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
About the Presenter: Stephen Chin

    • Oracle Java/JavaFX Evangelist
    • Authored several books, most
      recently Pro JavaFX 2
    • Wrote the JavaFX 1 & 2 Refcard
    • Blog: steveonjava.com
    • Twitter: @steveonjava
    • E-mail: stephen.chin@oracle.com

2   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
    reserved.
Safe Harbor Statement

    The following is intended to outline our general
    product direction. It is intended for information
    purposes only, and may not be incorporated into
    any contract. It is not a commitment to deliver any
    material, code, or functionality, and should not be
    relied upon in making purchasing decisions. The
    development, release, and timing of any features or
    functionality described for Oracle’s products
    remains at the sole discretion of Oracle.



3   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
    reserved.
JavaFX Resources

    • Visit ProJavaFX2.com to download Chapter 1
      and all code examples
    • JavaFX site: oracle.com/javafx
    • NetBeans site: netbeans.org
    • FXExperience blog: fxexperience.com
    • Jim Weaver’s JavaFX blog: JavaFXpert.com
    • My JavaFX blog: steveonjava.com




4   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
    reserved.
What I want you to take away

    1. The JRE with JavaFX enables graphically
       rich, fast performing applications
    2. Developing JavaFX apps is natural and fun
    3. You can build robust business applications
       using the Spring Framework and JavaFX
    4. You should begin playing with JavaFX and
       Spring now!


5   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
    reserved.
1. Getting Started with JavaFX

    •   Bringing back rich-client Java
    •   Learning the history of JavaFX
    •   Obtaining JavaFX tools and resources
    •   Building and running Hello EarthRise
    •   Reviewing the structure of Hello EarthRise




6   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
    reserved.
Bringing back rich-client Java

    • The web, originally intended for sharing
      hypertext-linked resources, has been
      force-fit into being a rich-client platform
    • The JRE with JavaFX is a much better
      client platform, enabling graphically rich,
      fast performing applications
    • See Chapter 1 JavaFX Can’t Bring Rich-
      Client Java Back by Itself section

7   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
    reserved.
Learning the history of JavaFX

    • The brainchild of Chris Oliver while at SeeBeyond,
      which was acquired by Sun
    • JavaFX Script language and platform announced
      at JavaOne 2007
    • Oracle implemented JavaFX 2 as an API for Java,
      announced at JavaOne 2010
    • JavaFX 2.1 GA released for JavaOne India 2012
          – Windows and OS/X now GA, Linux GA soon
    • See Chapter 1 A Brief History of JavaFX section


8   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
    reserved.
Obtaining JavaFX tools and resources

    • Visit oracle.com/javafx and click Download
    • Grab the co-bundled Java SE 7u6, JavaFX
      2.2 and NetBeans 7.2

    • Note: Java SE 7u4+ bundles JavaFX 2.1




9   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
    reserved.
Building and running Hello EarthRise

     • Follow the steps in Chapter 1 Building and Running
       the Program with NetBeans section




10   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Demo


11   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Review the structure of Hello Earthrise

     •   Application class and overriden start()
     •   Declarative code that defines the UI
     •   Using the Stage class
     •   Using the Scene class
     •   Displaying images
     •   See Chapter 1 Understanding the Hello
         Earthrise Program section

12   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Code Walkthru


13   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
2. Using the JavaFX UI Controls

     •   Demo the StarterApp example
     •   Examine the StarterApp code
     •   Survey UI controls in StarterApp
     •   Leveraging the UI controls in code
     •   Associating a JavaFX CSS style sheet
     •   Defining model classes



14   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Demo the StarterApp example


                                                                                                                                     • StarterApp code
                                                                                                                                       is in the
                                                                                                                                       8727_ch05code
                                                                                                                                       folder of the Pro
                                                                                                                                       JavaFX 2 code
                                                                                                                                       download bundle




15   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Demo


16   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Examine StarterApp code

     •   Survey UI controls in StarterApp
     •   Leveraging the UI controls in code
     •   Associating a JavaFX CSS style sheet
     •   Defining model classes




17   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Code Walkthru


18   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
3. Using Media Classes with Spring

     • Demo the SpringVideoPlayer example
     • Examine the SpringVideoPlayer code
     • Using the MediaView, MediaPlayer and
       Media classes
     • Configuring and loading the Spring
       context



19   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Demo the SpringVideoPlayer example




20   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Demo


21   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Examine SpringVideoPlayer code

     • Using the MediaView, MediaPlayer and
       Media classes
     • Using a procedural vs. declarative
       approach




22   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Spring Context and Configuration



          SpringVideoPlayer                                                           VideoConfiguration                             MediaPlayerScreen

     • Starts the JavaFX                                                            • Loads the Media                                • Wraps the
       App Thread                                                                     as a Spring Bean                                 MediaView
     • Loads the Spring                                                             • Creates the                                    • Exposes
       Context                                                                        Screen UI a a                                    MediaPlayer
                                                                                      Spring Bean                                      controls



23   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Code Walkthru


24   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
4. Spring Data and Security

     • Show the CustomerService backend
     • Show the CustomerDataApp frontend
     • Demonstrate Spring security to enforce
       permissions on the client



                              Special thanks to Josh Long (@starbuxman) for help with this application



25   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Customer Data Application




26   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Demo


27   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
5. Using SceneBuilder

     • Show the SceneBuilder tool
     • Create a new application from scratch in
       SceneBuilder
     • Integrate in a Spring/JavaFX application
     • Show how to hook up a JavaFX Controller




28   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Building UIs with SceneBuilder




29   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Demo


30   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
6. Deploying JavaFX apps

     • Some options are Java WebStart and
       running as an applet
           – e.g. Icon at well-known web page that
             invokes TweetBrowser via Java WebStart
     • Another good deployment option is
       creating an installer
           – “there’s an app for that”
           – See related FXexperience.com blog post
           – Packager available in JavaFX 2.2

31   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Take-aways from this presentation
     1. The JRE with JavaFX enables graphically
        rich, fast performing applications
     2. Developing JavaFX apps is natural, fun,
        and even faster using SceneBuilder
     3. You can use Spring on the backend to
        provide a web service API
     4. You can also use Spring on the frontend for
        beans, dependency injection, and security
     5. You should begin playing with JavaFX and
        Spring now!
32   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
Q&A


33   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.
34   Copyright © 2011, Oracle and/or its affiliates. All rights   Insert Information Protection Policy Classification from Slide 8
     reserved.

More Related Content

What's hot

Seven Points for Applying Java EE 7
Seven Points for Applying Java EE 7Seven Points for Applying Java EE 7
Seven Points for Applying Java EE 7
Hirofumi Iwasaki
 
JavaFX and JEE 7
JavaFX and JEE 7JavaFX and JEE 7
JavaFX and JEE 7
Vijay Nair
 

What's hot (20)

JSF 2.2
JSF 2.2JSF 2.2
JSF 2.2
 
Seven Points for Applying Java EE 7
Seven Points for Applying Java EE 7Seven Points for Applying Java EE 7
Seven Points for Applying Java EE 7
 
[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 
2015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.02015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.0
 
JavaFX Uni Parthenope
JavaFX Uni ParthenopeJavaFX Uni Parthenope
JavaFX Uni Parthenope
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the Horizon
 
JavaFX and JEE 7
JavaFX and JEE 7JavaFX and JEE 7
JavaFX and JEE 7
 
Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013
 
MVC 1.0 / JSR 371
MVC 1.0 / JSR 371MVC 1.0 / JSR 371
MVC 1.0 / JSR 371
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
 
Java spring ppt
Java spring pptJava spring ppt
Java spring ppt
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
 
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
 
EE4J: Java EE & Jakarta EE JFR & JMC
EE4J: Java EE & Jakarta EE  JFR & JMCEE4J: Java EE & Jakarta EE  JFR & JMC
EE4J: Java EE & Jakarta EE JFR & JMC
 
Modern web application development with java ee 7
Modern web application development with java ee 7Modern web application development with java ee 7
Modern web application development with java ee 7
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 Demystified
 
MicroProfile for MicroServices
MicroProfile for MicroServicesMicroProfile for MicroServices
MicroProfile for MicroServices
 
Java 9 Modularity and Project Jigsaw
Java 9 Modularity and Project JigsawJava 9 Modularity and Project Jigsaw
Java 9 Modularity and Project Jigsaw
 
JSONB introduction and comparison with other frameworks
JSONB introduction and comparison with other frameworksJSONB introduction and comparison with other frameworks
JSONB introduction and comparison with other frameworks
 

Viewers also liked

2012 ERDÉRT TUZSÉR ZRT eng
2012 ERDÉRT TUZSÉR ZRT eng2012 ERDÉRT TUZSÉR ZRT eng
2012 ERDÉRT TUZSÉR ZRT eng
T
 
SF-Bicycle-Coalition-TT-Spring-2015-WEB
SF-Bicycle-Coalition-TT-Spring-2015-WEBSF-Bicycle-Coalition-TT-Spring-2015-WEB
SF-Bicycle-Coalition-TT-Spring-2015-WEB
Eric Tuvel
 

Viewers also liked (20)

Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
 
Oracle IoT Kids Workshop
Oracle IoT Kids WorkshopOracle IoT Kids Workshop
Oracle IoT Kids Workshop
 
Devoxx4Kids NAO Workshop
Devoxx4Kids NAO WorkshopDevoxx4Kids NAO Workshop
Devoxx4Kids NAO Workshop
 
Devoxx4Kids Lego Workshop
Devoxx4Kids Lego WorkshopDevoxx4Kids Lego Workshop
Devoxx4Kids Lego Workshop
 
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)
 
What is tackled in the Java EE Security API (Java EE 8)
What is tackled in the Java EE Security API (Java EE 8)What is tackled in the Java EE Security API (Java EE 8)
What is tackled in the Java EE Security API (Java EE 8)
 
RetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming ConsoleRetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming Console
 
Presentación oraquo analytics 2016
Presentación oraquo analytics 2016Presentación oraquo analytics 2016
Presentación oraquo analytics 2016
 
Factores de riesgo cf-view copia
Factores de riesgo cf-view copiaFactores de riesgo cf-view copia
Factores de riesgo cf-view copia
 
2012 ERDÉRT TUZSÉR ZRT eng
2012 ERDÉRT TUZSÉR ZRT eng2012 ERDÉRT TUZSÉR ZRT eng
2012 ERDÉRT TUZSÉR ZRT eng
 
Formación integral en la ibero
Formación integral en la iberoFormación integral en la ibero
Formación integral en la ibero
 
Presentación del Capítulo Andaluz de la AEI Ciberseguridad y Tecnologías Avan...
Presentación del Capítulo Andaluz de la AEI Ciberseguridad y Tecnologías Avan...Presentación del Capítulo Andaluz de la AEI Ciberseguridad y Tecnologías Avan...
Presentación del Capítulo Andaluz de la AEI Ciberseguridad y Tecnologías Avan...
 
SF-Bicycle-Coalition-TT-Spring-2015-WEB
SF-Bicycle-Coalition-TT-Spring-2015-WEBSF-Bicycle-Coalition-TT-Spring-2015-WEB
SF-Bicycle-Coalition-TT-Spring-2015-WEB
 
Univera Overview Ppt
Univera Overview PptUnivera Overview Ppt
Univera Overview Ppt
 
Tablas faltantes
Tablas faltantesTablas faltantes
Tablas faltantes
 
Telecollaboration for CLIL Teachers in Secondary Education
Telecollaboration for CLIL Teachers in Secondary EducationTelecollaboration for CLIL Teachers in Secondary Education
Telecollaboration for CLIL Teachers in Secondary Education
 
Music 1010 presentation marco antonio solis 2
Music 1010 presentation marco antonio solis 2Music 1010 presentation marco antonio solis 2
Music 1010 presentation marco antonio solis 2
 
Graduate Engineering NYU School Information Webinar
Graduate Engineering NYU School Information WebinarGraduate Engineering NYU School Information Webinar
Graduate Engineering NYU School Information Webinar
 
What's New in Java 8
What's New in Java 8What's New in Java 8
What's New in Java 8
 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
 

Similar to JavaFX 2 Using the Spring Framework

Return of Rich Client Java - Brazil
Return of Rich Client Java - BrazilReturn of Rich Client Java - Brazil
Return of Rich Client Java - Brazil
Stephen Chin
 
JSF 2.2 Status at DOAG 2011
JSF 2.2 Status at DOAG 2011JSF 2.2 Status at DOAG 2011
JSF 2.2 Status at DOAG 2011
Edward Burns
 

Similar to JavaFX 2 Using the Spring Framework (20)

Return of Rich Client Java - Brazil
Return of Rich Client Java - BrazilReturn of Rich Client Java - Brazil
Return of Rich Client Java - Brazil
 
Introduction To JavaFX 2.0
Introduction To JavaFX 2.0Introduction To JavaFX 2.0
Introduction To JavaFX 2.0
 
JDK versions and OpenJDK
JDK versions and OpenJDKJDK versions and OpenJDK
JDK versions and OpenJDK
 
DesktopApps.pptx
DesktopApps.pptxDesktopApps.pptx
DesktopApps.pptx
 
Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...
Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...
Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...
 
It's a jdk jungle out there - JDK 11 and OpenJDK 11
It's a jdk jungle out there - JDK 11 and OpenJDK 11It's a jdk jungle out there - JDK 11 and OpenJDK 11
It's a jdk jungle out there - JDK 11 and OpenJDK 11
 
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12c
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12cDeveloping Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12c
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12c
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
 
Jfxpub binding
Jfxpub bindingJfxpub binding
Jfxpub binding
 
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško VukmanovićJavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and Triumphs
 
Jakarta EE: Today and Tomorrow
Jakarta EE: Today and TomorrowJakarta EE: Today and Tomorrow
Jakarta EE: Today and Tomorrow
 
Java SE Subscription Workshop
Java SE Subscription WorkshopJava SE Subscription Workshop
Java SE Subscription Workshop
 
Project
ProjectProject
Project
 
Java 101
Java 101Java 101
Java 101
 
JSF 2.2 Status at DOAG 2011
JSF 2.2 Status at DOAG 2011JSF 2.2 Status at DOAG 2011
JSF 2.2 Status at DOAG 2011
 
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
 
JDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDKJDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDK
 
Virtual dev-day-java7-keynote-1641807
Virtual dev-day-java7-keynote-1641807Virtual dev-day-java7-keynote-1641807
Virtual dev-day-java7-keynote-1641807
 
Polyglot! A Lightweight Cloud Platform for Java SE, Node, and More
Polyglot! A Lightweight Cloud Platform for Java SE, Node, and MorePolyglot! A Lightweight Cloud Platform for Java SE, Node, and More
Polyglot! A Lightweight Cloud Platform for Java SE, Node, and More
 

More from Stephen Chin

Raspberry pi gaming 4 kids
Raspberry pi gaming 4 kidsRaspberry pi gaming 4 kids
Raspberry pi gaming 4 kids
Stephen Chin
 

More from 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
 
JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)
 
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
 
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
 
Raspberry Pi Gaming 4 Kids - Dutch Version
Raspberry Pi Gaming 4 Kids - Dutch VersionRaspberry Pi Gaming 4 Kids - Dutch Version
Raspberry Pi Gaming 4 Kids - Dutch Version
 
Raspberry pi gaming 4 kids
Raspberry pi gaming 4 kidsRaspberry pi gaming 4 kids
Raspberry pi gaming 4 kids
 
Mary Had a Little λ (QCon)
Mary Had a Little λ (QCon)Mary Had a Little λ (QCon)
Mary Had a Little λ (QCon)
 
Raspberry Pi à la GroovyFX
Raspberry Pi à la GroovyFXRaspberry Pi à la GroovyFX
Raspberry Pi à la GroovyFX
 
LUGOD Raspberry Pi Hacking
LUGOD Raspberry Pi HackingLUGOD Raspberry Pi Hacking
LUGOD Raspberry Pi Hacking
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 

JavaFX 2 Using the Spring Framework

  • 1. JavaFX 2 Using the Spring Framework Presented by Stephen Chin <@steveonjava> 1 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 2. About the Presenter: Stephen Chin • Oracle Java/JavaFX Evangelist • Authored several books, most recently Pro JavaFX 2 • Wrote the JavaFX 1 & 2 Refcard • Blog: steveonjava.com • Twitter: @steveonjava • E-mail: stephen.chin@oracle.com 2 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 3. Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 3 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 4. JavaFX Resources • Visit ProJavaFX2.com to download Chapter 1 and all code examples • JavaFX site: oracle.com/javafx • NetBeans site: netbeans.org • FXExperience blog: fxexperience.com • Jim Weaver’s JavaFX blog: JavaFXpert.com • My JavaFX blog: steveonjava.com 4 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 5. What I want you to take away 1. The JRE with JavaFX enables graphically rich, fast performing applications 2. Developing JavaFX apps is natural and fun 3. You can build robust business applications using the Spring Framework and JavaFX 4. You should begin playing with JavaFX and Spring now! 5 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 6. 1. Getting Started with JavaFX • Bringing back rich-client Java • Learning the history of JavaFX • Obtaining JavaFX tools and resources • Building and running Hello EarthRise • Reviewing the structure of Hello EarthRise 6 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 7. Bringing back rich-client Java • The web, originally intended for sharing hypertext-linked resources, has been force-fit into being a rich-client platform • The JRE with JavaFX is a much better client platform, enabling graphically rich, fast performing applications • See Chapter 1 JavaFX Can’t Bring Rich- Client Java Back by Itself section 7 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 8. Learning the history of JavaFX • The brainchild of Chris Oliver while at SeeBeyond, which was acquired by Sun • JavaFX Script language and platform announced at JavaOne 2007 • Oracle implemented JavaFX 2 as an API for Java, announced at JavaOne 2010 • JavaFX 2.1 GA released for JavaOne India 2012 – Windows and OS/X now GA, Linux GA soon • See Chapter 1 A Brief History of JavaFX section 8 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 9. Obtaining JavaFX tools and resources • Visit oracle.com/javafx and click Download • Grab the co-bundled Java SE 7u6, JavaFX 2.2 and NetBeans 7.2 • Note: Java SE 7u4+ bundles JavaFX 2.1 9 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 10. Building and running Hello EarthRise • Follow the steps in Chapter 1 Building and Running the Program with NetBeans section 10 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 11. Demo 11 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 12. Review the structure of Hello Earthrise • Application class and overriden start() • Declarative code that defines the UI • Using the Stage class • Using the Scene class • Displaying images • See Chapter 1 Understanding the Hello Earthrise Program section 12 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 13. Code Walkthru 13 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 14. 2. Using the JavaFX UI Controls • Demo the StarterApp example • Examine the StarterApp code • Survey UI controls in StarterApp • Leveraging the UI controls in code • Associating a JavaFX CSS style sheet • Defining model classes 14 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 15. Demo the StarterApp example • StarterApp code is in the 8727_ch05code folder of the Pro JavaFX 2 code download bundle 15 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 16. Demo 16 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 17. Examine StarterApp code • Survey UI controls in StarterApp • Leveraging the UI controls in code • Associating a JavaFX CSS style sheet • Defining model classes 17 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 18. Code Walkthru 18 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 19. 3. Using Media Classes with Spring • Demo the SpringVideoPlayer example • Examine the SpringVideoPlayer code • Using the MediaView, MediaPlayer and Media classes • Configuring and loading the Spring context 19 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 20. Demo the SpringVideoPlayer example 20 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 21. Demo 21 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 22. Examine SpringVideoPlayer code • Using the MediaView, MediaPlayer and Media classes • Using a procedural vs. declarative approach 22 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 23. Spring Context and Configuration SpringVideoPlayer VideoConfiguration MediaPlayerScreen • Starts the JavaFX • Loads the Media • Wraps the App Thread as a Spring Bean MediaView • Loads the Spring • Creates the • Exposes Context Screen UI a a MediaPlayer Spring Bean controls 23 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 24. Code Walkthru 24 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 25. 4. Spring Data and Security • Show the CustomerService backend • Show the CustomerDataApp frontend • Demonstrate Spring security to enforce permissions on the client Special thanks to Josh Long (@starbuxman) for help with this application 25 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 26. Customer Data Application 26 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 27. Demo 27 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 28. 5. Using SceneBuilder • Show the SceneBuilder tool • Create a new application from scratch in SceneBuilder • Integrate in a Spring/JavaFX application • Show how to hook up a JavaFX Controller 28 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 29. Building UIs with SceneBuilder 29 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 30. Demo 30 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 31. 6. Deploying JavaFX apps • Some options are Java WebStart and running as an applet – e.g. Icon at well-known web page that invokes TweetBrowser via Java WebStart • Another good deployment option is creating an installer – “there’s an app for that” – See related FXexperience.com blog post – Packager available in JavaFX 2.2 31 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 32. Take-aways from this presentation 1. The JRE with JavaFX enables graphically rich, fast performing applications 2. Developing JavaFX apps is natural, fun, and even faster using SceneBuilder 3. You can use Spring on the backend to provide a web service API 4. You can also use Spring on the frontend for beans, dependency injection, and security 5. You should begin playing with JavaFX and Spring now! 32 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 33. Q&A 33 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.
  • 34. 34 Copyright © 2011, Oracle and/or its affiliates. All rights Insert Information Protection Policy Classification from Slide 8 reserved.