SlideShare a Scribd company logo
1 of 37
Building Data Rich Interfaces with JavaFX Stephen Chin Inovis
About the Presenter Director SWE Inovis, Inc. Open-Source JavaFX Hacker MBA Belotti Award UberScrumMaster XP Coach Agile Portfolio Process Speaker Pro JavaFX Author Java Champion JavaOneRockstar JFXtras WidgetFX FEST-JavaFX Silicon Valley JavaFX User Group Founder Family Man Motorcyclist
3 AGENDA JavaFX Technology Stack Data Binding JavaFX 1.3 Controls Control Styling JavaFX 1.3 Layouts Web Service Integration JFXtras Data-driven Controls Apropos Demo Pro JavaFX Quiz with Prizes!
JavaFX Technology Stack XControls Swing Handlers XLayouts Wipe JFXtras Project Controls Layouts Media Web Services Binding CSS JavaFX Platform JVM Security APIs Deployment … Java Platform
Evolution of Data Binding JavaFX Binding Bind Library Property Change Listeners Callbacks
Bind Expressions Unidirectional: property: bindobject.value property: bindsequence[index] sequence: bindfor (v in values) convert(v) Bijective: property: bindvalue with inverse Function: public bound function calculateTotal(subtotal, tax) {    return subtotal * (1 + tax);} New in JavaFX 1.3 – All binding is lazy!
Binding to Controls boundfunctiongetScore() {[ ScoreLine {line: "Ski Jumping - Individual Norml"} ScoreLine {line: ""} ScoreLine {line: bind"            {%-10smedal.type}        "} ScoreLine {line: bind"{%-17smedal.name}  {%-3smedal.country}   {%3.1fmedal.score}"}  ]} defsb = ScoreBoard { lightColor: bindmedal.lightColor     lines: bindgetScore() onMousePressed: function(e) { if(e.primaryButtonDown) {             medal = medals[(Sequences.indexOf(medals, medal) + 1) modsizeof medals]         } else{ FX.exit();  }}}
Dynamic Binding JFXtras extension for runtime binding to an existing JavaFX object via reflection. Example: classReflectionTarget { publicvarfieldA:String; } defreflectionTarget = ReflectionTarget {fieldA: “A"} defmirror = context.mirrorOf(reflectionTarget); defxbind = XBind.bindWithInverse(mirror, mirror.getType().getVariable("fieldA")); xbind.ref = "B"; What is the value of: reflectionTarget.fieldA? 8
Java to JavaFX Binding Prototype by Johannes Schneider:http://blog.cedarsoft.com/ Java to JavaFX PropertyChangeEvents: Just make your Java Bean fire PropertyChangeEvents whenever a property has changed JavaFX to Java Variable Setter: The corresponding setter of your Java object is called PropertyChangeEvents: JavaFX binding updates trigger PropertyChangeEvents JavaFxBridge.bridge(javaModel).to(slider asFXObject).connecting(JavaFxBridge.bind("amount").to("value").withInverse()); Will be included in the JFXtras 0.8 Release – Feedback on the syntax welcome!
JavaFX 1.3 Top 10 Features 10
JavaFX 1.3 Top 10 4 Features 11 New Controls Layout Enhancements Enhanced CSS Preview Features TOP SECRET
New Controls in JavaFX 1.3 var list = ["apples", "bananas", "oranges", "pears", "cabbage"];   ScrollView {   width: 250   height: 250   managed: false   node: VBox {     padding: Insets {top: 10, left: 10, bottom: 10, right: 10}     spacing: 10     content: [       PasswordBox {promptText: "enter password"}       Separator {}       ChoiceBox {         items: list       }       ListView {         vertical: false         items: list       }  ]}} PasswordBox Separator ChoiceBox ScrollView HorizontalList
Preview Controls in JavaFX 1.3 MenuBar {     menus: for (i in [0..4]) Menu {         text: "Menu {i}"         items: for (j in [0..4]) MenuItem {             text: "Menu Item {j}"         }     } } ToolBar {     items: for (i in [0..4]) Button {text: "Button {i}"} } TreeView {     root: TreeItem {         expanded: true         data: "Root"         children: for (i in [0..4]) [ TreeItem {                 data: "Item {i}"  }]}} MenuBar Menu ToolBar TreeView
Styling Controls VBox {     spacing: 20 nodeHPos: HPos.CENTER     content: [         Text {content: "Default Styling"}         Button {text: "Button"} CheckBox {text: "CheckBox", selected: true}         Slider {value: 50}     ] layoutInfo: LayoutInfo {         margin: Insets {bottom: 20, top: 20, left: 20, right: 20}     } } 14 Source: Dean Iverson, http://pleasingsoftware.blogspot.com/2010/04/so-whats-it-all-good-for.html
Styling Controls – Button/CheckBox .button {     -fx-base: dodgerblue;     -fx-shape: "M 50,30  m 0,25  a 1,1 0 " "0,0 0,-50  a 1,1 0 1,0 0,50";     -fx-scale-shape: false; } .check-box:selected *.label {     -fx-text-fill: red } .check-box:selected *.mark {     -fx-background-color: red;     -fx-shape: "M 0,0 H1 L 4,4 7,0 H8 V1 L 5,4 8,7" "V8 H7 L 4,5 1,8 H0 V7 L 3,4 0,1 Z"; } 15 Source: Dean Iverson, http://pleasingsoftware.blogspot.com/2010/04/so-whats-it-all-good-for.html
Styling Controls – Slider .slider *.track {     -fx-base: derive( goldenrod, 50% ); } .slider *.thumb {     -fx-shape: "M 50,5 L 37,40 5,40 30,60 20,95 " "50,75 80,95 70,60 95,40 63,40 Z";     -fx-background-color: derive(goldenrod,-50%), goldenrod;     -fx-background-radius: 0, 0;     -fx-background-insets: 0, 2;     -fx-padding: 10;     -fx-effect: dropshadow( two-pass-box , rgba(0,0,0,0.6) , 4, 0.0 , 0 , 1 ); } 16 Source: Dean Iverson, http://pleasingsoftware.blogspot.com/2010/04/so-whats-it-all-good-for.html
JavaFX 1.3 Layout Enhancements GridLayout Based on the JFXtrasXGrid In the JavaFX Preview Package Fill Controls how Nodes expand to take available space Grow/Shrink Controls how available space is allocated between competing Nodes Priority values: NEVER SOMETIMES ALWAYS 17
JavaFX 1.3 Layouts – Grid Grow/Fill Example 18 ?
JUG Prize Spinner Web Service Integration
Calling a REST Service REST URL: http://api.meetup.com/rsvps.json/event_id={eventId}&key={apiKey} Output: { "results": [   {"zip":"94044","lon":"-122.48999786376953","photo_url":"http:photos1.meetupstatic.comphotosmember14bamember_5333306.jpeg","response":"no","name":"Andres Almiray","comment":"Can't make it :-("} ]}
JUG Prize Spinner - JSONHandler in 3 Steps publicclass Member { publicvarplace:Integer; publicvarphotoUrl:String; publicvarname:String; publicvarcomment:String; } varmemberParser:JSONHandler = JSONHandler {   rootClass: "org.jfxtras.jugspinner.data.MemberSearch “   onDone: function(obj, isSequence): Void {     members = (objasMemberSearch).results; }} req = HttpRequest {   location: rsvpQuery onInput: function(is: java.io.InputStream) { memberParser.parse(is); }} 1 POJfxO 2 JSONHandler 3 HttpRequest
Advanced Controls JFXtrasXTable and XShelf 22
XShelfView High Performance Features: Scrollbar Image Title Reflection Effect Aspect Ratio Infinite Repeat Integrates With JFXtras Data Providers Automatically Updates on Model Changes
JFXtras Data Providers
XTableView Insanely Scalable Up to 16 million rows Extreme Performance Pools rendered nodes Caches images Optimized scene graph Features: Drag-and-Drop Column Reordering Dynamic Updating from Model Automatically Populates Column Headers Fully Styleable via CSS
XTableView Example – JUG Prize Spinner defwinnerTable = XTableView { rowType: Member {}.getJFXClass();     rows: bind winners     columns: columns // optional rowHeight: 50 // optional } columns = [ XTableColumn{ displayName: "#" id: "place" prefWidth: 10       renderer: TextRenderer {}     } XTableColumn{ displayName: "Photo"       id: "photoUrl" prefWidth: 30 renderer: ImageRenderer { missing: placeholder placeholder: placeholder }     } XTableColumn{ displayName: "Name" id: "name" prefWidth: 300 renderer: TextRenderer {} }] 26
APROPOS Agile Project Portfolio Scheduler 27
Marketing Sales Feature selling becomes impossible (Sales Enablement) Launch Cycle Time > Dev Cycle Time Melting Change Managers: 50 changes once a month to 900 changes constantly Product Management Operations Development …in the weeds… Professional Services Support Innovator’s Dilemma Supported Release proliferation Source: Based on Gat et al, Reformulating the Product Delivery Process, LSSC Conference,  April 2010 Source: Based on Gat et al, Reformulating the Product Delivery Process, LSSC Conference,  April 2010 The Agile Challenge in End-to-End Context
The Three Loops of Software Governance Dev: Technical debt Operations/Support Marketing/Sales Proposed Marketing Sales Validated Adopted Enabled Internal Technical Debt Loop Product Management Operations Scheduled Backlogged In Process Development Deployed External Technical Debt Loop Bottleneck Professional Services Support Validated Enabled Adopted Source: Based on Gat et al, Reformulating the Product Delivery Process, LSSC Conference,  April 2010
Apropos Demo
Pro JavaFX 1.3 Quiz All Binding in JavaFX is ____ Answer: Lazy The New Controls in JavaFX 1.3 Are: ____, ____, and ____ Answer: ChoiceBox, PasswordBox, ScrollView, Separator Or preview: Menu, Tree, Toolbar The JavaFX Preview Grid was contributed by the _____ project Answer: JFXtras 31
Stephen Chinhttp://steveonjava.com/ Inovissteve@steveonjava.com tweet: @steveonjava
Apropos – Portfolio View 33
Apropos – Scope View 34
Apropos – Resource View 35
Apropos – Analyze View 36
Apropos – Roadmap View 37

More Related Content

What's hot

Web2py tutorial to create db driven application.
Web2py tutorial to create db driven application.Web2py tutorial to create db driven application.
Web2py tutorial to create db driven application.
fRui Apps
 
Web2py Code Lab
Web2py Code LabWeb2py Code Lab
Web2py Code Lab
Colin Su
 
Creating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login SystemCreating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login System
Azharul Haque Shohan
 
sfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin BundlesfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin Bundle
th0masr
 
Web весна 2013 лекция 6
Web весна 2013 лекция 6Web весна 2013 лекция 6
Web весна 2013 лекция 6
Technopark
 

What's hot (20)

JavaScript
JavaScriptJavaScript
JavaScript
 
Backbone - TDC 2011 Floripa
Backbone - TDC 2011 FloripaBackbone - TDC 2011 Floripa
Backbone - TDC 2011 Floripa
 
Django Forms: Best Practices, Tips, Tricks
Django Forms: Best Practices, Tips, TricksDjango Forms: Best Practices, Tips, Tricks
Django Forms: Best Practices, Tips, Tricks
 
Javascript
JavascriptJavascript
Javascript
 
Web2py tutorial to create db driven application.
Web2py tutorial to create db driven application.Web2py tutorial to create db driven application.
Web2py tutorial to create db driven application.
 
Unit testing with zend framework PHPBenelux
Unit testing with zend framework PHPBeneluxUnit testing with zend framework PHPBenelux
Unit testing with zend framework PHPBenelux
 
Desenvolvendo APIs usando Rails - Guru SC 2012
Desenvolvendo APIs usando Rails - Guru SC 2012Desenvolvendo APIs usando Rails - Guru SC 2012
Desenvolvendo APIs usando Rails - Guru SC 2012
 
2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript Security2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript Security
 
Cfml features modern coding into the box 2018
Cfml features modern coding into the box 2018Cfml features modern coding into the box 2018
Cfml features modern coding into the box 2018
 
Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)
 
CSS in React - Will Change Transform
CSS in React - Will Change TransformCSS in React - Will Change Transform
CSS in React - Will Change Transform
 
Introduzione JQuery
Introduzione JQueryIntroduzione JQuery
Introduzione JQuery
 
Web2py Code Lab
Web2py Code LabWeb2py Code Lab
Web2py Code Lab
 
Unit testing with zend framework tek11
Unit testing with zend framework tek11Unit testing with zend framework tek11
Unit testing with zend framework tek11
 
Laravel 로 배우는 서버사이드 #5
Laravel 로 배우는 서버사이드 #5Laravel 로 배우는 서버사이드 #5
Laravel 로 배우는 서버사이드 #5
 
Creating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login SystemCreating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login System
 
Kyiv.py #17 Flask talk
Kyiv.py #17 Flask talkKyiv.py #17 Flask talk
Kyiv.py #17 Flask talk
 
Workshop 6: Designer tools
Workshop 6: Designer toolsWorkshop 6: Designer tools
Workshop 6: Designer tools
 
sfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin BundlesfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin Bundle
 
Web весна 2013 лекция 6
Web весна 2013 лекция 6Web весна 2013 лекция 6
Web весна 2013 лекция 6
 

Viewers also liked

Inventory management system
Inventory management systemInventory management system
Inventory management system
copo7475
 

Viewers also liked (7)

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]
 
Building Amazing Applications with JavaFX
Building Amazing Applications with JavaFXBuilding Amazing Applications with JavaFX
Building Amazing Applications with JavaFX
 
JavaFX In Practice
JavaFX In PracticeJavaFX In Practice
JavaFX In Practice
 
Human Resource Management System Java Project
Human Resource Management System Java ProjectHuman Resource Management System Java Project
Human Resource Management System Java Project
 
Internet mail system java project
Internet mail system java projectInternet mail system java project
Internet mail system java project
 
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
 
Inventory management system
Inventory management systemInventory management system
Inventory management system
 

Similar to Building Data Rich Interfaces with JavaFX

RichFaces: rich:* component library
RichFaces: rich:* component libraryRichFaces: rich:* component library
RichFaces: rich:* component library
Max Katz
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
Chris Alfano
 

Similar to Building Data Rich Interfaces with JavaFX (20)

The Java Fx Platform – A Java Developer’S Guide
The Java Fx Platform – A Java Developer’S GuideThe Java Fx Platform – A Java Developer’S Guide
The Java Fx Platform – A Java Developer’S Guide
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVC
 
CSS3 and jQuery
CSS3 and jQueryCSS3 and jQuery
CSS3 and jQuery
 
CSS3 vs jQuery
CSS3 vs jQueryCSS3 vs jQuery
CSS3 vs jQuery
 
Ext JS Introduction
Ext JS IntroductionExt JS Introduction
Ext JS Introduction
 
RichFaces: rich:* component library
RichFaces: rich:* component libraryRichFaces: rich:* component library
RichFaces: rich:* component library
 
What You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFWhat You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSF
 
JavaFXで開く新世代GUI
JavaFXで開く新世代GUIJavaFXで開く新世代GUI
JavaFXで開く新世代GUI
 
JavaFX introduction
JavaFX introductionJavaFX introduction
JavaFX introduction
 
Intro to JavaFX & Widget FX
Intro to JavaFX & Widget FXIntro to JavaFX & Widget FX
Intro to JavaFX & Widget FX
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
 
Scalable web application architecture
Scalable web application architectureScalable web application architecture
Scalable web application architecture
 
"Full Stack frameworks or a story about how to reconcile Front (good) and Bac...
"Full Stack frameworks or a story about how to reconcile Front (good) and Bac..."Full Stack frameworks or a story about how to reconcile Front (good) and Bac...
"Full Stack frameworks or a story about how to reconcile Front (good) and Bac...
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech Tour
 
Jsf intro
Jsf introJsf intro
Jsf intro
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
 
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
 
當ZK遇見Front-End
當ZK遇見Front-End當ZK遇見Front-End
當ZK遇見Front-End
 
What Is JavaFX
What Is JavaFXWhat Is JavaFX
What Is JavaFX
 
JavaFX for Java Developers
JavaFX for Java DevelopersJavaFX for Java Developers
JavaFX for Java Developers
 

More from 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
 
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
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
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
 

Building Data Rich Interfaces with JavaFX

  • 1. Building Data Rich Interfaces with JavaFX Stephen Chin Inovis
  • 2. About the Presenter Director SWE Inovis, Inc. Open-Source JavaFX Hacker MBA Belotti Award UberScrumMaster XP Coach Agile Portfolio Process Speaker Pro JavaFX Author Java Champion JavaOneRockstar JFXtras WidgetFX FEST-JavaFX Silicon Valley JavaFX User Group Founder Family Man Motorcyclist
  • 3. 3 AGENDA JavaFX Technology Stack Data Binding JavaFX 1.3 Controls Control Styling JavaFX 1.3 Layouts Web Service Integration JFXtras Data-driven Controls Apropos Demo Pro JavaFX Quiz with Prizes!
  • 4. JavaFX Technology Stack XControls Swing Handlers XLayouts Wipe JFXtras Project Controls Layouts Media Web Services Binding CSS JavaFX Platform JVM Security APIs Deployment … Java Platform
  • 5. Evolution of Data Binding JavaFX Binding Bind Library Property Change Listeners Callbacks
  • 6. Bind Expressions Unidirectional: property: bindobject.value property: bindsequence[index] sequence: bindfor (v in values) convert(v) Bijective: property: bindvalue with inverse Function: public bound function calculateTotal(subtotal, tax) { return subtotal * (1 + tax);} New in JavaFX 1.3 – All binding is lazy!
  • 7. Binding to Controls boundfunctiongetScore() {[ ScoreLine {line: "Ski Jumping - Individual Norml"} ScoreLine {line: ""} ScoreLine {line: bind" {%-10smedal.type} "} ScoreLine {line: bind"{%-17smedal.name} {%-3smedal.country} {%3.1fmedal.score}"} ]} defsb = ScoreBoard { lightColor: bindmedal.lightColor lines: bindgetScore() onMousePressed: function(e) { if(e.primaryButtonDown) { medal = medals[(Sequences.indexOf(medals, medal) + 1) modsizeof medals] } else{ FX.exit(); }}}
  • 8. Dynamic Binding JFXtras extension for runtime binding to an existing JavaFX object via reflection. Example: classReflectionTarget { publicvarfieldA:String; } defreflectionTarget = ReflectionTarget {fieldA: “A"} defmirror = context.mirrorOf(reflectionTarget); defxbind = XBind.bindWithInverse(mirror, mirror.getType().getVariable("fieldA")); xbind.ref = "B"; What is the value of: reflectionTarget.fieldA? 8
  • 9. Java to JavaFX Binding Prototype by Johannes Schneider:http://blog.cedarsoft.com/ Java to JavaFX PropertyChangeEvents: Just make your Java Bean fire PropertyChangeEvents whenever a property has changed JavaFX to Java Variable Setter: The corresponding setter of your Java object is called PropertyChangeEvents: JavaFX binding updates trigger PropertyChangeEvents JavaFxBridge.bridge(javaModel).to(slider asFXObject).connecting(JavaFxBridge.bind("amount").to("value").withInverse()); Will be included in the JFXtras 0.8 Release – Feedback on the syntax welcome!
  • 10. JavaFX 1.3 Top 10 Features 10
  • 11. JavaFX 1.3 Top 10 4 Features 11 New Controls Layout Enhancements Enhanced CSS Preview Features TOP SECRET
  • 12. New Controls in JavaFX 1.3 var list = ["apples", "bananas", "oranges", "pears", "cabbage"];   ScrollView {   width: 250   height: 250   managed: false   node: VBox {     padding: Insets {top: 10, left: 10, bottom: 10, right: 10}     spacing: 10     content: [       PasswordBox {promptText: "enter password"}       Separator {}       ChoiceBox {         items: list       }       ListView {         vertical: false         items: list       }  ]}} PasswordBox Separator ChoiceBox ScrollView HorizontalList
  • 13. Preview Controls in JavaFX 1.3 MenuBar { menus: for (i in [0..4]) Menu { text: "Menu {i}" items: for (j in [0..4]) MenuItem { text: "Menu Item {j}" } } } ToolBar { items: for (i in [0..4]) Button {text: "Button {i}"} } TreeView { root: TreeItem { expanded: true data: "Root" children: for (i in [0..4]) [ TreeItem { data: "Item {i}" }]}} MenuBar Menu ToolBar TreeView
  • 14. Styling Controls VBox { spacing: 20 nodeHPos: HPos.CENTER content: [ Text {content: "Default Styling"} Button {text: "Button"} CheckBox {text: "CheckBox", selected: true} Slider {value: 50} ] layoutInfo: LayoutInfo { margin: Insets {bottom: 20, top: 20, left: 20, right: 20} } } 14 Source: Dean Iverson, http://pleasingsoftware.blogspot.com/2010/04/so-whats-it-all-good-for.html
  • 15. Styling Controls – Button/CheckBox .button { -fx-base: dodgerblue; -fx-shape: "M 50,30 m 0,25 a 1,1 0 " "0,0 0,-50 a 1,1 0 1,0 0,50"; -fx-scale-shape: false; } .check-box:selected *.label { -fx-text-fill: red } .check-box:selected *.mark { -fx-background-color: red; -fx-shape: "M 0,0 H1 L 4,4 7,0 H8 V1 L 5,4 8,7" "V8 H7 L 4,5 1,8 H0 V7 L 3,4 0,1 Z"; } 15 Source: Dean Iverson, http://pleasingsoftware.blogspot.com/2010/04/so-whats-it-all-good-for.html
  • 16. Styling Controls – Slider .slider *.track { -fx-base: derive( goldenrod, 50% ); } .slider *.thumb { -fx-shape: "M 50,5 L 37,40 5,40 30,60 20,95 " "50,75 80,95 70,60 95,40 63,40 Z"; -fx-background-color: derive(goldenrod,-50%), goldenrod; -fx-background-radius: 0, 0; -fx-background-insets: 0, 2; -fx-padding: 10; -fx-effect: dropshadow( two-pass-box , rgba(0,0,0,0.6) , 4, 0.0 , 0 , 1 ); } 16 Source: Dean Iverson, http://pleasingsoftware.blogspot.com/2010/04/so-whats-it-all-good-for.html
  • 17. JavaFX 1.3 Layout Enhancements GridLayout Based on the JFXtrasXGrid In the JavaFX Preview Package Fill Controls how Nodes expand to take available space Grow/Shrink Controls how available space is allocated between competing Nodes Priority values: NEVER SOMETIMES ALWAYS 17
  • 18. JavaFX 1.3 Layouts – Grid Grow/Fill Example 18 ?
  • 19. JUG Prize Spinner Web Service Integration
  • 20. Calling a REST Service REST URL: http://api.meetup.com/rsvps.json/event_id={eventId}&key={apiKey} Output: { "results": [ {"zip":"94044","lon":"-122.48999786376953","photo_url":"http:photos1.meetupstatic.comphotosmember14bamember_5333306.jpeg","response":"no","name":"Andres Almiray","comment":"Can't make it :-("} ]}
  • 21. JUG Prize Spinner - JSONHandler in 3 Steps publicclass Member { publicvarplace:Integer; publicvarphotoUrl:String; publicvarname:String; publicvarcomment:String; } varmemberParser:JSONHandler = JSONHandler {   rootClass: "org.jfxtras.jugspinner.data.MemberSearch “   onDone: function(obj, isSequence): Void {     members = (objasMemberSearch).results; }} req = HttpRequest { location: rsvpQuery onInput: function(is: java.io.InputStream) { memberParser.parse(is); }} 1 POJfxO 2 JSONHandler 3 HttpRequest
  • 23. XShelfView High Performance Features: Scrollbar Image Title Reflection Effect Aspect Ratio Infinite Repeat Integrates With JFXtras Data Providers Automatically Updates on Model Changes
  • 25. XTableView Insanely Scalable Up to 16 million rows Extreme Performance Pools rendered nodes Caches images Optimized scene graph Features: Drag-and-Drop Column Reordering Dynamic Updating from Model Automatically Populates Column Headers Fully Styleable via CSS
  • 26. XTableView Example – JUG Prize Spinner defwinnerTable = XTableView { rowType: Member {}.getJFXClass(); rows: bind winners columns: columns // optional rowHeight: 50 // optional } columns = [ XTableColumn{ displayName: "#" id: "place" prefWidth: 10 renderer: TextRenderer {} } XTableColumn{ displayName: "Photo" id: "photoUrl" prefWidth: 30 renderer: ImageRenderer { missing: placeholder placeholder: placeholder } } XTableColumn{ displayName: "Name" id: "name" prefWidth: 300 renderer: TextRenderer {} }] 26
  • 27. APROPOS Agile Project Portfolio Scheduler 27
  • 28. Marketing Sales Feature selling becomes impossible (Sales Enablement) Launch Cycle Time > Dev Cycle Time Melting Change Managers: 50 changes once a month to 900 changes constantly Product Management Operations Development …in the weeds… Professional Services Support Innovator’s Dilemma Supported Release proliferation Source: Based on Gat et al, Reformulating the Product Delivery Process, LSSC Conference, April 2010 Source: Based on Gat et al, Reformulating the Product Delivery Process, LSSC Conference, April 2010 The Agile Challenge in End-to-End Context
  • 29. The Three Loops of Software Governance Dev: Technical debt Operations/Support Marketing/Sales Proposed Marketing Sales Validated Adopted Enabled Internal Technical Debt Loop Product Management Operations Scheduled Backlogged In Process Development Deployed External Technical Debt Loop Bottleneck Professional Services Support Validated Enabled Adopted Source: Based on Gat et al, Reformulating the Product Delivery Process, LSSC Conference, April 2010
  • 31. Pro JavaFX 1.3 Quiz All Binding in JavaFX is ____ Answer: Lazy The New Controls in JavaFX 1.3 Are: ____, ____, and ____ Answer: ChoiceBox, PasswordBox, ScrollView, Separator Or preview: Menu, Tree, Toolbar The JavaFX Preview Grid was contributed by the _____ project Answer: JFXtras 31
  • 34. Apropos – Scope View 34

Editor's Notes

  1. Mention the XGrid layout got added to the JavaFX Platform.