SlideShare une entreprise Scribd logo
1  sur  50
JAVAFX 8
MOHAMAD TAMAN
Enterprise Architect & Software Development Manager
Efinance, Cairo, Egypt.
Write once, run everywhere
ABOUT ME
JCP, Java Champions, Was JCP EC, won the 2014 Duke’s choice
and 11th annual JCP adopt 2013 awards, Hacker, Speaks Java,
Architect, international speaker, IoT Geek, Author.
@_tamanm
about.me/mohamedtaman
ANNOUNCEMENT
Get it from :
https://www.packtpub.com/web-
development/javafx-essentials
Or
http://www.amazon.com/JavaFX-
Essentials-Mohamed-
Taman/dp/1784398020
WHAT IS THE
PROBLEM?
WE NEED
A next-generation Graphical User Interface (GUI) toolkit.
As a platform that makes it easy to rapidly build high-
performance Java client-side applications.
WE NEED
A GUI toolkit with underlying engines take advantage of
modern GPUs through hardware accelerated graphics,
while providing well-designed programming interfaces, thus
enabling developers to combine graphics, animation, and
UI controls.
INTRODUCTION
JAVA FX?
JAVA + FLASH + FLEX
JAVA FX
JAVA FX?
• An API included in Java SE 8
For UI development
• The successor of Java Swing
WHY JAVA FX?
• Rich Internet Application that Cross platform:
• Windows, Mac & Linux, Solaris, Arm, Mobile.
• Familiar: 100% Java APIs with millions Library
• Easy to Develop even for Beginner
• Drag and Drop Application
• Only use Java Language Programming
• GUI Development with Cross Platform
WHY JAVAFX ?
 Productivity
– Rapid Application Development using Tooling (Netbeans and
SceneBuilder)
– Testing and…
– We are coding only in Java
User Interface
WHY JAVAFX ?
User Interface
 Capability
– Layouts built using WYSIWYG
– Control Set (Basic and Advanced)
– Eventing (e.g. Value Change Listeners, Thread State Listeners)
– CSS styling
WHY JAVAFX ?
FXML
VIEWS
 Screen Building using Scene Builder which
generates FXML
– Layout Containers
– Place Controls
– Associate Events
– Style
 Map to a Controller Class
FXML
Generates
Controller
Associate
JAVA PIONEERED RICH CLIENT APPLICATIONS
But developers had to learn multiple technologies
JAVAFX SIMPLIFIES APPLICATION DEVELOPMENT
Developers Focus on Capabilities Instead of Technologies
LEARN THE BASIC
MINIMUM STANDARD TOOLS FOR
EASY DEVELOPMENT
 NETBEANS, ECLIPSE, ORACLE JDeveloper
 JDK 7 or 8
 JDK 7 -> Java FX 2.2 (Separated Installer)
 JDK 8 -> JAVA FX 8 Included in Installer
 Scene Builder 2.0
 Gloun Scene Builder 8.0
COMPONENT IN JAVA FX
 Containers
– Accordion, Anchor Pane, Stack Pane, Tab Pane, HBox, and VBox
 Controls
– Buttons, Choice Box, Combo Box, ImageView, WebView,
TextField, TextArea, Label…
 Shapes
– Rectangle, Circle, Arc, Ellipse, Line, Polygon, Text, Cubic Curve
 Charts
– Area Chart, Bar Chart, Scatter Chart, Pie Chart, Bubble Chart
SCENE BUILDER, FXML, AND
CONTROLLER
 Scene Builder
– Drag and Drop Application for Layout GUI
 FXML
– Script layout GUI that generated from Scene Builder
 Controller
– In Order FXML be dynamic content need Controller to
control components
HOW TO START?
HOW TO START?
 You can start with learn in Java FX Sample Demo using
Ensemble8 for JDK 8.
 Read my book, JavaFX essentials (Packt 2015) by Mohamed
Taman.
 An Amazing book, JavaFX 8: Introduction by Example, Second
Edition,Carl Dea, Mark Heckler, Gerrit Grunwald, José Pereda, and
Sean M. Phillips (Apress, 2014. ISBN: 978-1-4302-6460-6)
 Oracle website: http://docs.oracle.com/javase/8/javase-
clienttechnologies.htm
DEMOS
JAVAFX ON MOBILE
JAVAFX ON MOBILE
 Based on the official support from Oracle Corporation for JavaFX, a
number of people inside the JavaFX community are working to port
JavaFX to make it run on as many devices and platforms as
possible (desktop, mobile, and embedded) and different operating
systems, with the same codebase.
 They have successfully created SDKs that allow us to develop
JavaFX applications as native applications to run on Android or
iOS-based devices in one bundle (JVM plus application)
JAVAFX ON MOBILE
 JavaFX applications on iOS using the port from RoboVM
(http://www.robovm.org/) and on Android using the port from JavaFXPorts
(http://javafxports.org/).
 For interoperability with Android native API the FXActivity class, is the
bridge between JavaFX and the Dalvik runtime.
JAVAFX ON MOBILE
Now a single plugin called jfxmobile-
plugin allows us to build applications for
three platforms desktop, Android, and
iOS from the same codebase.
JAVAFX ON MOBILE ANDROID VERSION
JAVAFX ON MOBILE iOS VERSION
JAVAFX ON RASPBERRY PI
JAVAFX ON THE RASPBERRY PI
Very closely related to the IoT
world, the Raspberry Pi is a credit
card-sized microcomputer
designed by the Raspberry Pi
Foundation for experimentation and
education.
JAVAFX ON THE RASPBERRY PI
 What you should know about the Raspberry Pi is that it is nothing
but a small computer. Small power requirements, small physical
size, small memory, and most importantly a low-cost device.
 Everything about it is small, but it is still just a computer and it
uses Linux.
JAVAFX ON THE RASPBERRY PI
 Java was made for IoT from the first day of its invention.
 Java was created with a clear vision in mind: to control small
devices such as television set-top boxes.
 With the explosion of IoT, Java returns to its roots.
JAVAFX ON THE RASPBERRY PI
 You may think that JavaFX, a platform for rich-client development, would
miss the IoT party—but it is not so! According to the JavaFX Overview
page on the Oracle Technology Network:
– "It is designed to provide a lightweight, hardware-accelerated Java UI
platform"
 This statement holds the key to graphically rich-and-powerful JavaFX:
hardware acceleration and; luckily, the Raspberry Pi comes with a
powerful GPU.
JAVAFX ON THE RASPBERRY PI
JAVAFX ON THE RASPBERRY PI
JAVAFX WITH ARDUINO
JAVAFX WITH ARDUINO
Arduino is an open source
electronics tool based on a simple
programmable microcontroller
board that can be programmed
using a free open source IDE.
JAVAFX WITH ARDUINO
Alone or attached to a computer, it creates interactive devices
that can sense by taking inputs from a variety of switches or
sensors and can act by controlling a variety of lights, motors, and
other outputs physical devices.
JAVAFX WITH ARDUINO
Arduino runs standalone or can communicate with software
running on your computer (Java, JavaFX, Python, and so on)
and the boards can be assembled by hand or purchased
preassembled.
JAVAFX WITH ARDUINO (DEMO)
A desktop application using JavaFX along with an Arduino board
in order to monitor data coming from a real world temperature
sensor and report it on a chart,
How HOT blooded you really are!
JAVAFX WITH ARDUINO (DEMO)
JAVAFX WITH ARDUINO (DEMO)
JAVAFX WITH ARDUINO (THREADING)
 The main use of Platform.runLater() is placing the task
of filling the series data with the incoming Arduino input
in the JavaFX thread.
 Also it gives the required time to the Scene graph to
render the chart, skipping values if they are added too
fast.
TOUCHLESS JAVAFX APPS
TOUCHLESS JAVAFX APPS
 Every day we notice the rise of
input interfaces that are less
mouse-centric and more in favor of
touchless input.
 Gestures are one of the ways
humans can communicate with
machines naturally these days.
TOUCHLESS JAVAFX APPS
 There are several devices on the market that actually allow us to interact with computers
using just some parts of our body: many games for the Xbox, the Microsoft game
console, use the Kinect controller to recognize the user's body movements.
 The myoelectric armband detects movements in your muscles and translates them into
gestures so that you can interact with your computer.
 Leap Motion controller recognizes users' hands and fingers and translate the
movements and gestures to the computer.
TOUCHLESS JAVAFX APPS (LEAP MOTION)
 Here is a very tiny device with 13 mm
height, 30 mm width, 76 mm depth, and a
weight of 45 grams (final dimensions: 0.5" x
1.2" x 3").
 With the Leap Motion software running on
your computer, just plug the controller into
the USB on your Mac or PC and you are
ready to go (without any external power
source).
TOUCHLESS JAVAFX APPS (DEMO 3D)
RESOURCES
 JavaFX website: http://javafx.com
 Open source project
http://openjdk.java.net/projects/openjfx/
 Oracle Premier Support for Software
http://www.oracle.com/us/support/software/premier/
 Blogs
– http://fxexperience.com
– http://blogs.oracle.com/javafx
 Book, JavaFX essentials 2015 by Mohamed Taman.
 Oracle website: http://docs.oracle.com/javase/8/javase-clienttechnologies.htm
THANK YOU

Contenu connexe

Tendances

Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum Slides
Abhishek Gupta
 
Common Client Rich Client Platforms
Common Client   Rich Client PlatformsCommon Client   Rich Client Platforms
Common Client Rich Client Platforms
Geertjan Wielenga
 
Framework dynamic par Simone Sivetta
Framework dynamic par Simone SivettaFramework dynamic par Simone Sivetta
Framework dynamic par Simone Sivetta
CocoaHeads France
 

Tendances (20)

Ch2
Ch2Ch2
Ch2
 
The Evolution of Java
The Evolution of JavaThe Evolution of Java
The Evolution of Java
 
Java history 01
Java history 01Java history 01
Java history 01
 
Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum Slides
 
Common Client Rich Client Platforms
Common Client   Rich Client PlatformsCommon Client   Rich Client Platforms
Common Client Rich Client Platforms
 
The Evolution of Java
The Evolution of JavaThe Evolution of Java
The Evolution of Java
 
Why java is important in programming language?
Why java is important in programming language?Why java is important in programming language?
Why java is important in programming language?
 
Titanium: Native Mobile Apps with Javascript
Titanium: Native Mobile Apps with Javascript Titanium: Native Mobile Apps with Javascript
Titanium: Native Mobile Apps with Javascript
 
Java 1
Java 1Java 1
Java 1
 
Evolution Of Java
Evolution Of JavaEvolution Of Java
Evolution Of Java
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Jvm mbeans jmxtran
Jvm mbeans jmxtranJvm mbeans jmxtran
Jvm mbeans jmxtran
 
Core java environment setup and details
Core java environment setup and detailsCore java environment setup and details
Core java environment setup and details
 
Simplifying Desktop Development With Glimmer
Simplifying Desktop Development With GlimmerSimplifying Desktop Development With Glimmer
Simplifying Desktop Development With Glimmer
 
Java History
Java HistoryJava History
Java History
 
Java the reason behind its never ending demand
Java the reason behind its never ending demandJava the reason behind its never ending demand
Java the reason behind its never ending demand
 
Hybrid Mobile Applications
Hybrid Mobile ApplicationsHybrid Mobile Applications
Hybrid Mobile Applications
 
Java useful in Mule
Java useful in MuleJava useful in Mule
Java useful in Mule
 
Cordova 3, apps para android
Cordova 3, apps para androidCordova 3, apps para android
Cordova 3, apps para android
 
Framework dynamic par Simone Sivetta
Framework dynamic par Simone SivettaFramework dynamic par Simone Sivetta
Framework dynamic par Simone Sivetta
 

En vedette

En vedette (9)

Xamarin
XamarinXamarin
Xamarin
 
2015 Java update and roadmap, JUG sevilla
2015  Java update and roadmap, JUG sevilla2015  Java update and roadmap, JUG sevilla
2015 Java update and roadmap, JUG sevilla
 
Cross platform mobile application development
Cross platform mobile application developmentCross platform mobile application development
Cross platform mobile application development
 
Cross Platform Mobile Application Development
Cross Platform Mobile Application DevelopmentCross Platform Mobile Application Development
Cross Platform Mobile Application Development
 
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
 
Cross platform approach for mobile application development : a survey
Cross platform approach for mobile application development : a surveyCross platform approach for mobile application development : a survey
Cross platform approach for mobile application development : a survey
 
JavaFX 2 Rich Desktop Platform
JavaFX 2 Rich Desktop PlatformJavaFX 2 Rich Desktop Platform
JavaFX 2 Rich Desktop Platform
 
All The Screens: Cross Platform Design Strategies
All The Screens: Cross Platform Design StrategiesAll The Screens: Cross Platform Design Strategies
All The Screens: Cross Platform Design Strategies
 
Building Quality Cross-Platform Apps with Xamarin
Building Quality Cross-Platform Apps with XamarinBuilding Quality Cross-Platform Apps with Xamarin
Building Quality Cross-Platform Apps with Xamarin
 

Similaire à JavaFX 8 everywhere; write once run anywhere by Mohamed Taman

Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technology
sshhzap
 
J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01
Jay Palit
 
The Brainify App - JavaFx
The Brainify App - JavaFxThe Brainify App - JavaFx
The Brainify App - JavaFx
Mohd Shamweel
 
Javafxpressentation 140524053934-phpapp01 (1)
Javafxpressentation 140524053934-phpapp01 (1)Javafxpressentation 140524053934-phpapp01 (1)
Javafxpressentation 140524053934-phpapp01 (1)
ssuser4f9de3
 

Similaire à JavaFX 8 everywhere; write once run anywhere by Mohamed Taman (20)

Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
 
Java presentation
Java presentationJava presentation
Java presentation
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technology
 
J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01
 
The Brainify App - JavaFx
The Brainify App - JavaFxThe Brainify App - JavaFx
The Brainify App - JavaFx
 
Javafx
JavafxJavafx
Javafx
 
Core java slides
Core java slidesCore java slides
Core java slides
 
Java Programming (M&M)
Java Programming (M&M)Java Programming (M&M)
Java Programming (M&M)
 
Java fx
Java fxJava fx
Java fx
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java Slides
 
JavaFX: A Rich Internet Application (RIA) Development Platform
JavaFX: A Rich Internet Application (RIA) Development PlatformJavaFX: A Rich Internet Application (RIA) Development Platform
JavaFX: A Rich Internet Application (RIA) Development Platform
 
JavaFX Presentation
JavaFX PresentationJavaFX Presentation
JavaFX Presentation
 
Javafxpressentation 140524053934-phpapp01 (1)
Javafxpressentation 140524053934-phpapp01 (1)Javafxpressentation 140524053934-phpapp01 (1)
Javafxpressentation 140524053934-phpapp01 (1)
 
Beyond The Buzz: Pluggable JavaFX Corporate Applications
Beyond The Buzz: Pluggable JavaFX Corporate ApplicationsBeyond The Buzz: Pluggable JavaFX Corporate Applications
Beyond The Buzz: Pluggable JavaFX Corporate Applications
 
What is Java | Learn Java | Types of Java
What is Java | Learn Java | Types of JavaWhat is Java | Learn Java | Types of Java
What is Java | Learn Java | Types of Java
 
Java Intro
Java IntroJava Intro
Java Intro
 
GUI design using JAVAFX.ppt
GUI design using JAVAFX.pptGUI design using JAVAFX.ppt
GUI design using JAVAFX.ppt
 
Hinkmond's JavaFX Mobile Dojo
Hinkmond's JavaFX Mobile DojoHinkmond's JavaFX Mobile Dojo
Hinkmond's JavaFX Mobile Dojo
 
Core Java-1 (1).pdf
Core Java-1 (1).pdfCore Java-1 (1).pdf
Core Java-1 (1).pdf
 
JavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and EcosystemJavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and Ecosystem
 

Plus de JavaDayUA

Plus de JavaDayUA (20)

STEMing Kids: One workshop at a time
STEMing Kids: One workshop at a timeSTEMing Kids: One workshop at a time
STEMing Kids: One workshop at a time
 
Flavors of Concurrency in Java
Flavors of Concurrency in JavaFlavors of Concurrency in Java
Flavors of Concurrency in Java
 
What to expect from Java 9
What to expect from Java 9What to expect from Java 9
What to expect from Java 9
 
Continuously building, releasing and deploying software: The Revenge of the M...
Continuously building, releasing and deploying software: The Revenge of the M...Continuously building, releasing and deploying software: The Revenge of the M...
Continuously building, releasing and deploying software: The Revenge of the M...
 
The Epic Groovy Puzzlers S02: The Revenge of the Parentheses
The Epic Groovy Puzzlers S02: The Revenge of the ParenthesesThe Epic Groovy Puzzlers S02: The Revenge of the Parentheses
The Epic Groovy Puzzlers S02: The Revenge of the Parentheses
 
20 Years of Java
20 Years of Java20 Years of Java
20 Years of Java
 
How to get the most out of code reviews
How to get the most out of code reviewsHow to get the most out of code reviews
How to get the most out of code reviews
 
Unlocking the Magic of Monads with Java 8
Unlocking the Magic of Monads with Java 8Unlocking the Magic of Monads with Java 8
Unlocking the Magic of Monads with Java 8
 
Virtual Private Cloud with container technologies for DevOps
Virtual Private Cloud with container technologies for DevOpsVirtual Private Cloud with container technologies for DevOps
Virtual Private Cloud with container technologies for DevOps
 
JShell: An Interactive Shell for the Java Platform
JShell: An Interactive Shell for the Java PlatformJShell: An Interactive Shell for the Java Platform
JShell: An Interactive Shell for the Java Platform
 
Interactive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureInteractive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and Architecture
 
MapDB - taking Java collections to the next level
MapDB - taking Java collections to the next levelMapDB - taking Java collections to the next level
MapDB - taking Java collections to the next level
 
Save Java memory
Save Java memorySave Java memory
Save Java memory
 
Design rationales in the JRockit JVM
Design rationales in the JRockit JVMDesign rationales in the JRockit JVM
Design rationales in the JRockit JVM
 
Next-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
Next-gen DevOps engineering with Docker and Kubernetes by Antons KrangaNext-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
Next-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
 
Apache Cassandra. Inception - all you need to know by Mikhail Dubkov
Apache Cassandra. Inception - all you need to know by Mikhail DubkovApache Cassandra. Inception - all you need to know by Mikhail Dubkov
Apache Cassandra. Inception - all you need to know by Mikhail Dubkov
 
Solution Architecture tips & tricks by Roman Shramkov
Solution Architecture tips & tricks by Roman ShramkovSolution Architecture tips & tricks by Roman Shramkov
Solution Architecture tips & tricks by Roman Shramkov
 
Testing in Legacy: from Rags to Riches by Taras Slipets
Testing in Legacy: from Rags to Riches by Taras SlipetsTesting in Legacy: from Rags to Riches by Taras Slipets
Testing in Legacy: from Rags to Riches by Taras Slipets
 
Reactive programming and Hystrix fault tolerance by Max Myslyvtsev
Reactive programming and Hystrix fault tolerance by Max MyslyvtsevReactive programming and Hystrix fault tolerance by Max Myslyvtsev
Reactive programming and Hystrix fault tolerance by Max Myslyvtsev
 
Spark-driven audience counting by Boris Trofimov
Spark-driven audience counting by Boris TrofimovSpark-driven audience counting by Boris Trofimov
Spark-driven audience counting by Boris Trofimov
 

Dernier

+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@
 

Dernier (20)

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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
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
 
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
 
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...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.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
 
+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...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

JavaFX 8 everywhere; write once run anywhere by Mohamed Taman

  • 1. JAVAFX 8 MOHAMAD TAMAN Enterprise Architect & Software Development Manager Efinance, Cairo, Egypt. Write once, run everywhere
  • 2. ABOUT ME JCP, Java Champions, Was JCP EC, won the 2014 Duke’s choice and 11th annual JCP adopt 2013 awards, Hacker, Speaks Java, Architect, international speaker, IoT Geek, Author. @_tamanm about.me/mohamedtaman
  • 3. ANNOUNCEMENT Get it from : https://www.packtpub.com/web- development/javafx-essentials Or http://www.amazon.com/JavaFX- Essentials-Mohamed- Taman/dp/1784398020
  • 5. WE NEED A next-generation Graphical User Interface (GUI) toolkit. As a platform that makes it easy to rapidly build high- performance Java client-side applications.
  • 6. WE NEED A GUI toolkit with underlying engines take advantage of modern GPUs through hardware accelerated graphics, while providing well-designed programming interfaces, thus enabling developers to combine graphics, animation, and UI controls.
  • 8. JAVA FX? JAVA + FLASH + FLEX JAVA FX
  • 9. JAVA FX? • An API included in Java SE 8 For UI development • The successor of Java Swing
  • 10. WHY JAVA FX? • Rich Internet Application that Cross platform: • Windows, Mac & Linux, Solaris, Arm, Mobile. • Familiar: 100% Java APIs with millions Library • Easy to Develop even for Beginner • Drag and Drop Application • Only use Java Language Programming • GUI Development with Cross Platform
  • 11. WHY JAVAFX ?  Productivity – Rapid Application Development using Tooling (Netbeans and SceneBuilder) – Testing and… – We are coding only in Java User Interface
  • 12. WHY JAVAFX ? User Interface  Capability – Layouts built using WYSIWYG – Control Set (Basic and Advanced) – Eventing (e.g. Value Change Listeners, Thread State Listeners) – CSS styling
  • 13. WHY JAVAFX ? FXML VIEWS  Screen Building using Scene Builder which generates FXML – Layout Containers – Place Controls – Associate Events – Style  Map to a Controller Class FXML Generates Controller Associate
  • 14. JAVA PIONEERED RICH CLIENT APPLICATIONS But developers had to learn multiple technologies
  • 15. JAVAFX SIMPLIFIES APPLICATION DEVELOPMENT Developers Focus on Capabilities Instead of Technologies
  • 17. MINIMUM STANDARD TOOLS FOR EASY DEVELOPMENT  NETBEANS, ECLIPSE, ORACLE JDeveloper  JDK 7 or 8  JDK 7 -> Java FX 2.2 (Separated Installer)  JDK 8 -> JAVA FX 8 Included in Installer  Scene Builder 2.0  Gloun Scene Builder 8.0
  • 18. COMPONENT IN JAVA FX  Containers – Accordion, Anchor Pane, Stack Pane, Tab Pane, HBox, and VBox  Controls – Buttons, Choice Box, Combo Box, ImageView, WebView, TextField, TextArea, Label…  Shapes – Rectangle, Circle, Arc, Ellipse, Line, Polygon, Text, Cubic Curve  Charts – Area Chart, Bar Chart, Scatter Chart, Pie Chart, Bubble Chart
  • 19. SCENE BUILDER, FXML, AND CONTROLLER  Scene Builder – Drag and Drop Application for Layout GUI  FXML – Script layout GUI that generated from Scene Builder  Controller – In Order FXML be dynamic content need Controller to control components
  • 21. HOW TO START?  You can start with learn in Java FX Sample Demo using Ensemble8 for JDK 8.  Read my book, JavaFX essentials (Packt 2015) by Mohamed Taman.  An Amazing book, JavaFX 8: Introduction by Example, Second Edition,Carl Dea, Mark Heckler, Gerrit Grunwald, José Pereda, and Sean M. Phillips (Apress, 2014. ISBN: 978-1-4302-6460-6)  Oracle website: http://docs.oracle.com/javase/8/javase- clienttechnologies.htm
  • 22. DEMOS
  • 24. JAVAFX ON MOBILE  Based on the official support from Oracle Corporation for JavaFX, a number of people inside the JavaFX community are working to port JavaFX to make it run on as many devices and platforms as possible (desktop, mobile, and embedded) and different operating systems, with the same codebase.  They have successfully created SDKs that allow us to develop JavaFX applications as native applications to run on Android or iOS-based devices in one bundle (JVM plus application)
  • 25. JAVAFX ON MOBILE  JavaFX applications on iOS using the port from RoboVM (http://www.robovm.org/) and on Android using the port from JavaFXPorts (http://javafxports.org/).  For interoperability with Android native API the FXActivity class, is the bridge between JavaFX and the Dalvik runtime.
  • 26. JAVAFX ON MOBILE Now a single plugin called jfxmobile- plugin allows us to build applications for three platforms desktop, Android, and iOS from the same codebase.
  • 27. JAVAFX ON MOBILE ANDROID VERSION
  • 28. JAVAFX ON MOBILE iOS VERSION
  • 30. JAVAFX ON THE RASPBERRY PI Very closely related to the IoT world, the Raspberry Pi is a credit card-sized microcomputer designed by the Raspberry Pi Foundation for experimentation and education.
  • 31. JAVAFX ON THE RASPBERRY PI  What you should know about the Raspberry Pi is that it is nothing but a small computer. Small power requirements, small physical size, small memory, and most importantly a low-cost device.  Everything about it is small, but it is still just a computer and it uses Linux.
  • 32. JAVAFX ON THE RASPBERRY PI  Java was made for IoT from the first day of its invention.  Java was created with a clear vision in mind: to control small devices such as television set-top boxes.  With the explosion of IoT, Java returns to its roots.
  • 33. JAVAFX ON THE RASPBERRY PI  You may think that JavaFX, a platform for rich-client development, would miss the IoT party—but it is not so! According to the JavaFX Overview page on the Oracle Technology Network: – "It is designed to provide a lightweight, hardware-accelerated Java UI platform"  This statement holds the key to graphically rich-and-powerful JavaFX: hardware acceleration and; luckily, the Raspberry Pi comes with a powerful GPU.
  • 34. JAVAFX ON THE RASPBERRY PI
  • 35. JAVAFX ON THE RASPBERRY PI
  • 37. JAVAFX WITH ARDUINO Arduino is an open source electronics tool based on a simple programmable microcontroller board that can be programmed using a free open source IDE.
  • 38. JAVAFX WITH ARDUINO Alone or attached to a computer, it creates interactive devices that can sense by taking inputs from a variety of switches or sensors and can act by controlling a variety of lights, motors, and other outputs physical devices.
  • 39. JAVAFX WITH ARDUINO Arduino runs standalone or can communicate with software running on your computer (Java, JavaFX, Python, and so on) and the boards can be assembled by hand or purchased preassembled.
  • 40. JAVAFX WITH ARDUINO (DEMO) A desktop application using JavaFX along with an Arduino board in order to monitor data coming from a real world temperature sensor and report it on a chart, How HOT blooded you really are!
  • 43. JAVAFX WITH ARDUINO (THREADING)  The main use of Platform.runLater() is placing the task of filling the series data with the incoming Arduino input in the JavaFX thread.  Also it gives the required time to the Scene graph to render the chart, skipping values if they are added too fast.
  • 45. TOUCHLESS JAVAFX APPS  Every day we notice the rise of input interfaces that are less mouse-centric and more in favor of touchless input.  Gestures are one of the ways humans can communicate with machines naturally these days.
  • 46. TOUCHLESS JAVAFX APPS  There are several devices on the market that actually allow us to interact with computers using just some parts of our body: many games for the Xbox, the Microsoft game console, use the Kinect controller to recognize the user's body movements.  The myoelectric armband detects movements in your muscles and translates them into gestures so that you can interact with your computer.  Leap Motion controller recognizes users' hands and fingers and translate the movements and gestures to the computer.
  • 47. TOUCHLESS JAVAFX APPS (LEAP MOTION)  Here is a very tiny device with 13 mm height, 30 mm width, 76 mm depth, and a weight of 45 grams (final dimensions: 0.5" x 1.2" x 3").  With the Leap Motion software running on your computer, just plug the controller into the USB on your Mac or PC and you are ready to go (without any external power source).
  • 49. RESOURCES  JavaFX website: http://javafx.com  Open source project http://openjdk.java.net/projects/openjfx/  Oracle Premier Support for Software http://www.oracle.com/us/support/software/premier/  Blogs – http://fxexperience.com – http://blogs.oracle.com/javafx  Book, JavaFX essentials 2015 by Mohamed Taman.  Oracle website: http://docs.oracle.com/javase/8/javase-clienttechnologies.htm