SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
Scripting with Java FX
Agenda
What is Java FX?
Why Java FX?
The 10 Minute Tutorial
Java FX Demo!
What To Do/Where To Go
Introduction: What is Java FX?
“JavaFX Script is a highly productive scripting language that
enables content developers to create rich media and content
for deployment on Java environments. JavaFX Script is a
declarative, statically-typed programming language. It has firstclass functions, declarative syntax, list-comprehensions, and
incremental dependency-based evaluation. It can make direct
calls to Java APIs that are on the platform.”
--https://openjfx.dev.java.net/
Why Java FX?
• Writing GUIs is hard (and annoying)
> Yes, Matisse helps quite a bunch, but...
> There are still too many listeners.
Why Java FX?
• Writing GUIs is hard (and annoying)
> Yes, Matisse helps quite a bunch, but...
> There are still too many listeners.

• GUIs by default are ugly
> A hierarchy of rectangular “grey boxes” (not limited to Java!)
> Not as snazzy as Flash websites
Why Java FX?
• Writing GUIs is hard (and annoying)
> Yes, Matisse helps quite a bunch, but...
> There are still too many listeners.

• GUIs by default are ugly
> A hierarchy of rectangular “grey boxes” (not limited to Java!)
> Not as snazzy as Flash websites

• Java 2D provides much what is needed, but...
> It is rather difficult to use for this purpose
> It does not have “compositional” behavior

Java FX's declarative syntax, combining Swing-like user-interface
widgets with compositional, Java 2D-like functionality makes writing
flashy graphical user interfaces easy!
Java FX: The 10 Minute Tutorial
class HelloWorldModel {
attribute saying: String;
}

Class definition with
single String attribute

var model = HelloWorldModel {
saying: "Hello Campus"
};

Instance of the class
called “model” which
initializes string

var win = Frame {
title: bind "{model.saying} JavaFX"
width: 200
content: TextField {
value: bind model.saying
}
visible: true
};

Frame with a single
text field. Frame's title
and text field's value is
bound to model's
attribute.
Java FX: The 10 Minute Tutorial
import java.lang.StringIndexOutOfBoundsException;

Defining

operation substring(s:String, n:Number): String { operations (i.e.
try {
methods)
return s.substring(n);
} catch (e:StringIndexOutOfBoundsException) {
throw “sorry, index out of bounds”;
}
}

Calling Java methods
Can throw any object
you like
Java FX: The 10 Minute Tutorial
var x = [1,2,3];
insert 10 into x;
insert 12 before x[1];
delete x[. == 12];
delete x[. >= 3];
insert 5 after x[. == 1];
insert 13 as first into x;
delete x;

Array Initialization
yields [1, 2, 3, 10]
yields [1, 12, 2, 3, 10]
yields [1, 2, 3, 10]
yields [1, 2]
yields [1, 5, 2]
yields [13, 1, 5, 2]
yields []

function factors(n) {
return select i from i in [1..n/2] where n % i == 0;
}

Database-like Queries
for Arrays!
Java FX: The 10 Minute Tutorial
class X {
attribute nums: Number*;
}
trigger on new X {
insert [3,4] into this.nums;
}

Object creation trigger
Array insertion trigger
Array replacement
trigger

trigger on insert num into X.nums {
System.out.println("just inserted {num} into X.nums at
position {indexof num}");
}
trigger on X.num[oldValue] = newValue {
System.out.println("X.num: just replaced {oldValue} with
{newValue}");
}
Java FX: The 10 Minute Tutorial
import javafx.ui.canvas.*;
import javafx.ui.*;

Canvas object for
arbitrary drawing

Canvas {
content: Group {
transform: [rotate(20,0,0)]
content:
[Rect {
x: 20
y: 20
height: 80
width: 300
...
},
Ellipse {
cx: 150
cy: 80
...
},
}]
}
}

Group objects together
Transform groups
Declarative 2D
Graphics
demo
Java FX

What to
Do

• Download Java FX & IDE
Plugins for Netbeans or
Eclipse
• Join OpenJFX Java.net
Project
• Do Java FX Tutorials
• Participate on Java FX
Forums
• Create something cool!

http://openjfx.dev.java.net
Java FX Resources
• Java FX Project Site: http://openjfx.dev.java.net
> Java.net: Download early versions of Java FX
> IDE Plugins, Tutorials, Forums, FAQs
> “Getting Started With the JavaFX Script Language”
> “JavaFX Script 2D Graphics Tutorial”
> “The JavaFX Script Programming Language Reference”

• Planet FX Wiki: http://jfx.wikia.com/wiki/Main_Page
> Open-source documentation site for Java FX

• Chris Oliver's Blog: http://blogs.sun.com/chrisoliver/
> Latest news, other informal information
> Source code for lots of demos (Space Invaders, Calculator)

• Sun's Java FX Site:
http://www.sun.com/software/javafx/
> Sun Microsystems official product page
Scripting with Java FX
http://openjfx.dev.java.net

THANK YOU!

Contenu connexe

Tendances

Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiRan Mizrahi
 
JavaScript 101
JavaScript 101JavaScript 101
JavaScript 101ygv2000
 
JavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJWORKS powered by Ordina
 
Object Oriented Programming In JavaScript
Object Oriented Programming In JavaScriptObject Oriented Programming In JavaScript
Object Oriented Programming In JavaScriptForziatech
 
Type script, for dummies
Type script, for dummiesType script, for dummies
Type script, for dummiessantiagoaguiar
 
JavaScript - Chapter 8 - Objects
 JavaScript - Chapter 8 - Objects JavaScript - Chapter 8 - Objects
JavaScript - Chapter 8 - ObjectsWebStackAcademy
 
002. Introducere in type script
002. Introducere in type script002. Introducere in type script
002. Introducere in type scriptDmitrii Stoian
 
Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)Tomer Gabel
 
Typescript tips & tricks
Typescript tips & tricksTypescript tips & tricks
Typescript tips & tricksOri Calvo
 
JavaScript in Object-Oriented Way
JavaScript in Object-Oriented WayJavaScript in Object-Oriented Way
JavaScript in Object-Oriented WayChamnap Chhorn
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsVikash Singh
 
Introduction to nodejs
Introduction to nodejsIntroduction to nodejs
Introduction to nodejsJames Carr
 
All You Need to Know About Type Script
All You Need to Know About Type ScriptAll You Need to Know About Type Script
All You Need to Know About Type ScriptFolio3 Software
 
All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS ExpressDavid Boyer
 
Advanced Javascript
Advanced JavascriptAdvanced Javascript
Advanced JavascriptDhruvin Shah
 

Tendances (19)

Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
 
JavaScript 101
JavaScript 101JavaScript 101
JavaScript 101
 
JavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UX
 
Lecture 5 javascript
Lecture 5 javascriptLecture 5 javascript
Lecture 5 javascript
 
Object Oriented Programming In JavaScript
Object Oriented Programming In JavaScriptObject Oriented Programming In JavaScript
Object Oriented Programming In JavaScript
 
Type script, for dummies
Type script, for dummiesType script, for dummies
Type script, for dummies
 
Object Oriented Javascript
Object Oriented JavascriptObject Oriented Javascript
Object Oriented Javascript
 
JavaScript - Chapter 8 - Objects
 JavaScript - Chapter 8 - Objects JavaScript - Chapter 8 - Objects
JavaScript - Chapter 8 - Objects
 
Node ppt
Node pptNode ppt
Node ppt
 
002. Introducere in type script
002. Introducere in type script002. Introducere in type script
002. Introducere in type script
 
Java Script Best Practices
Java Script Best PracticesJava Script Best Practices
Java Script Best Practices
 
Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)
 
Typescript tips & tricks
Typescript tips & tricksTypescript tips & tricks
Typescript tips & tricks
 
JavaScript in Object-Oriented Way
JavaScript in Object-Oriented WayJavaScript in Object-Oriented Way
JavaScript in Object-Oriented Way
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Introduction to nodejs
Introduction to nodejsIntroduction to nodejs
Introduction to nodejs
 
All You Need to Know About Type Script
All You Need to Know About Type ScriptAll You Need to Know About Type Script
All You Need to Know About Type Script
 
All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS Express
 
Advanced Javascript
Advanced JavascriptAdvanced Javascript
Advanced Javascript
 

Similaire à Scripting with Java FX - Cédric Tabin - December 2007

Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech TourCarol McDonald
 
Presentation - Course about JavaFX
Presentation - Course about JavaFXPresentation - Course about JavaFX
Presentation - Course about JavaFXTom Mix Petreca
 
Node.js vs Play Framework (with Japanese subtitles)
Node.js vs Play Framework (with Japanese subtitles)Node.js vs Play Framework (with Japanese subtitles)
Node.js vs Play Framework (with Japanese subtitles)Yevgeniy Brikman
 
EuRuKo JRuby Talk 2008
EuRuKo JRuby Talk 2008EuRuKo JRuby Talk 2008
EuRuKo JRuby Talk 2008geraldbauer
 
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 GuideStephen Chin
 
JavaFX Your Way: Building JavaFX Applications with Alternative Languages
JavaFX Your Way: Building JavaFX Applications with Alternative LanguagesJavaFX Your Way: Building JavaFX Applications with Alternative Languages
JavaFX Your Way: Building JavaFX Applications with Alternative LanguagesStephen Chin
 
JavaFX and Scala in the Cloud
JavaFX and Scala in the CloudJavaFX and Scala in the Cloud
JavaFX and Scala in the CloudStephen Chin
 
Don't panic in Fortaleza - ScalaFX
Don't panic in Fortaleza - ScalaFXDon't panic in Fortaleza - ScalaFX
Don't panic in Fortaleza - ScalaFXAlain Béarez
 
Intro to JavaFX & Widget FX
Intro to JavaFX & Widget FXIntro to JavaFX & Widget FX
Intro to JavaFX & Widget FXStephen Chin
 
Scala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologistScala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologistpmanvi
 
Spring Day | Spring and Scala | Eberhard Wolff
Spring Day | Spring and Scala | Eberhard WolffSpring Day | Spring and Scala | Eberhard Wolff
Spring Day | Spring and Scala | Eberhard WolffJAX London
 
Why Nodejs Guilin Shanghai
Why Nodejs Guilin ShanghaiWhy Nodejs Guilin Shanghai
Why Nodejs Guilin ShanghaiJackson Tian
 
Why Node.js
Why Node.jsWhy Node.js
Why Node.jsguileen
 
Core java over view basics introduction by quontra solutions
Core java over view basics introduction by quontra solutionsCore java over view basics introduction by quontra solutions
Core java over view basics introduction by quontra solutionsQUONTRASOLUTIONS
 
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]Stephen Chin
 
4 JVM Web Frameworks
4 JVM Web Frameworks4 JVM Web Frameworks
4 JVM Web FrameworksJoe Kutner
 
Rich Internet Applications con JavaFX e NetBeans
Rich Internet Applications  con JavaFX e NetBeans Rich Internet Applications  con JavaFX e NetBeans
Rich Internet Applications con JavaFX e NetBeans Fabrizio Giudici
 
From Java 6 to Java 7 reference
From Java 6 to Java 7 referenceFrom Java 6 to Java 7 reference
From Java 6 to Java 7 referenceGiacomo Veneri
 

Similaire à Scripting with Java FX - Cédric Tabin - December 2007 (20)

JavaFX introduction
JavaFX introductionJavaFX introduction
JavaFX introduction
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech Tour
 
Presentation - Course about JavaFX
Presentation - Course about JavaFXPresentation - Course about JavaFX
Presentation - Course about JavaFX
 
Node.js vs Play Framework (with Japanese subtitles)
Node.js vs Play Framework (with Japanese subtitles)Node.js vs Play Framework (with Japanese subtitles)
Node.js vs Play Framework (with Japanese subtitles)
 
EuRuKo JRuby Talk 2008
EuRuKo JRuby Talk 2008EuRuKo JRuby Talk 2008
EuRuKo JRuby Talk 2008
 
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
 
JavaFX Your Way: Building JavaFX Applications with Alternative Languages
JavaFX Your Way: Building JavaFX Applications with Alternative LanguagesJavaFX Your Way: Building JavaFX Applications with Alternative Languages
JavaFX Your Way: Building JavaFX Applications with Alternative Languages
 
JavaFX and Scala in the Cloud
JavaFX and Scala in the CloudJavaFX and Scala in the Cloud
JavaFX and Scala in the Cloud
 
Don't panic in Fortaleza - ScalaFX
Don't panic in Fortaleza - ScalaFXDon't panic in Fortaleza - ScalaFX
Don't panic in Fortaleza - ScalaFX
 
Intro to JavaFX & Widget FX
Intro to JavaFX & Widget FXIntro to JavaFX & Widget FX
Intro to JavaFX & Widget FX
 
Scala in a nutshell
Scala in a nutshellScala in a nutshell
Scala in a nutshell
 
Scala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologistScala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologist
 
Spring Day | Spring and Scala | Eberhard Wolff
Spring Day | Spring and Scala | Eberhard WolffSpring Day | Spring and Scala | Eberhard Wolff
Spring Day | Spring and Scala | Eberhard Wolff
 
Why Nodejs Guilin Shanghai
Why Nodejs Guilin ShanghaiWhy Nodejs Guilin Shanghai
Why Nodejs Guilin Shanghai
 
Why Node.js
Why Node.jsWhy Node.js
Why Node.js
 
Core java over view basics introduction by quontra solutions
Core java over view basics introduction by quontra solutionsCore java over view basics introduction by quontra solutions
Core java over view basics introduction by quontra solutions
 
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]
 
4 JVM Web Frameworks
4 JVM Web Frameworks4 JVM Web Frameworks
4 JVM Web Frameworks
 
Rich Internet Applications con JavaFX e NetBeans
Rich Internet Applications  con JavaFX e NetBeans Rich Internet Applications  con JavaFX e NetBeans
Rich Internet Applications con JavaFX e NetBeans
 
From Java 6 to Java 7 reference
From Java 6 to Java 7 referenceFrom Java 6 to Java 7 reference
From Java 6 to Java 7 reference
 

Plus de JUG Lausanne

Introduction aux algorithmes génétiques
Introduction aux algorithmes génétiquesIntroduction aux algorithmes génétiques
Introduction aux algorithmes génétiquesJUG Lausanne
 
Développer un moteur d'exécution symbolique en partant de rien
Développer un moteur d'exécution symbolique en partant de rienDévelopper un moteur d'exécution symbolique en partant de rien
Développer un moteur d'exécution symbolique en partant de rienJUG Lausanne
 
Reverse engineering Java et contournement du mécanisme de paiement inapp Android
Reverse engineering Java et contournement du mécanisme de paiement inapp AndroidReverse engineering Java et contournement du mécanisme de paiement inapp Android
Reverse engineering Java et contournement du mécanisme de paiement inapp AndroidJUG Lausanne
 
Exemple d'IOT et ML avec Android, Cassandra et Spark
Exemple d'IOT et ML avec Android, Cassandra et SparkExemple d'IOT et ML avec Android, Cassandra et Spark
Exemple d'IOT et ML avec Android, Cassandra et SparkJUG Lausanne
 
Play! chez Zaptravel - Nicolas Martignole - December 2012
Play! chez Zaptravel - Nicolas Martignole - December 2012Play! chez Zaptravel - Nicolas Martignole - December 2012
Play! chez Zaptravel - Nicolas Martignole - December 2012JUG Lausanne
 
Playframework Realtime Web - Guillaume Bort & Sadek Drobi - December 2012
Playframework Realtime Web - Guillaume Bort & Sadek Drobi - December 2012Playframework Realtime Web - Guillaume Bort & Sadek Drobi - December 2012
Playframework Realtime Web - Guillaume Bort & Sadek Drobi - December 2012JUG Lausanne
 
CloudBees - Sacha Labourey - May 2011
CloudBees - Sacha Labourey - May 2011CloudBees - Sacha Labourey - May 2011
CloudBees - Sacha Labourey - May 2011JUG Lausanne
 
Apache Camel - Stéphane Kay - April 2011
Apache Camel - Stéphane Kay - April 2011Apache Camel - Stéphane Kay - April 2011
Apache Camel - Stéphane Kay - April 2011JUG Lausanne
 
Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...
Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...
Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...JUG Lausanne
 
OpenDS - Ludovic Poitou - December 2010
OpenDS - Ludovic Poitou - December 2010OpenDS - Ludovic Poitou - December 2010
OpenDS - Ludovic Poitou - December 2010JUG Lausanne
 
Spring Batch - Julien Jakubowski - November 2010
Spring Batch - Julien Jakubowski - November 2010Spring Batch - Julien Jakubowski - November 2010
Spring Batch - Julien Jakubowski - November 2010JUG Lausanne
 
Infinispan - Galder Zamarreno - October 2010
Infinispan - Galder Zamarreno - October 2010Infinispan - Galder Zamarreno - October 2010
Infinispan - Galder Zamarreno - October 2010JUG Lausanne
 
No Sql - Olivier Mallassi - September 2010
No Sql - Olivier Mallassi - September 2010No Sql - Olivier Mallassi - September 2010
No Sql - Olivier Mallassi - September 2010JUG Lausanne
 
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010JUG Lausanne
 
Introduction à Scala - Michel Schinz - January 2010
Introduction à Scala - Michel Schinz - January 2010Introduction à Scala - Michel Schinz - January 2010
Introduction à Scala - Michel Schinz - January 2010JUG Lausanne
 
Introduction Groovy / Grails - Cyril Picat - December 2009
Introduction Groovy / Grails - Cyril Picat - December 2009Introduction Groovy / Grails - Cyril Picat - December 2009
Introduction Groovy / Grails - Cyril Picat - December 2009JUG Lausanne
 
Initiation aux tests fonctionnels - Philippe Kernevez - October 2009
Initiation aux tests fonctionnels - Philippe Kernevez - October 2009Initiation aux tests fonctionnels - Philippe Kernevez - October 2009
Initiation aux tests fonctionnels - Philippe Kernevez - October 2009JUG Lausanne
 
Sonar - Freddy Mallet - April 2009
Sonar - Freddy Mallet - April 2009Sonar - Freddy Mallet - April 2009
Sonar - Freddy Mallet - April 2009JUG Lausanne
 
Maven2 - Philippe Kernevez - March 2009
Maven2 - Philippe Kernevez - March 2009Maven2 - Philippe Kernevez - March 2009
Maven2 - Philippe Kernevez - March 2009JUG Lausanne
 
Introduction à Google Web Toolkit (GWT) - Philippe Kernevez - February 2009
Introduction à Google Web Toolkit (GWT) - Philippe Kernevez - February 2009Introduction à Google Web Toolkit (GWT) - Philippe Kernevez - February 2009
Introduction à Google Web Toolkit (GWT) - Philippe Kernevez - February 2009JUG Lausanne
 

Plus de JUG Lausanne (20)

Introduction aux algorithmes génétiques
Introduction aux algorithmes génétiquesIntroduction aux algorithmes génétiques
Introduction aux algorithmes génétiques
 
Développer un moteur d'exécution symbolique en partant de rien
Développer un moteur d'exécution symbolique en partant de rienDévelopper un moteur d'exécution symbolique en partant de rien
Développer un moteur d'exécution symbolique en partant de rien
 
Reverse engineering Java et contournement du mécanisme de paiement inapp Android
Reverse engineering Java et contournement du mécanisme de paiement inapp AndroidReverse engineering Java et contournement du mécanisme de paiement inapp Android
Reverse engineering Java et contournement du mécanisme de paiement inapp Android
 
Exemple d'IOT et ML avec Android, Cassandra et Spark
Exemple d'IOT et ML avec Android, Cassandra et SparkExemple d'IOT et ML avec Android, Cassandra et Spark
Exemple d'IOT et ML avec Android, Cassandra et Spark
 
Play! chez Zaptravel - Nicolas Martignole - December 2012
Play! chez Zaptravel - Nicolas Martignole - December 2012Play! chez Zaptravel - Nicolas Martignole - December 2012
Play! chez Zaptravel - Nicolas Martignole - December 2012
 
Playframework Realtime Web - Guillaume Bort & Sadek Drobi - December 2012
Playframework Realtime Web - Guillaume Bort & Sadek Drobi - December 2012Playframework Realtime Web - Guillaume Bort & Sadek Drobi - December 2012
Playframework Realtime Web - Guillaume Bort & Sadek Drobi - December 2012
 
CloudBees - Sacha Labourey - May 2011
CloudBees - Sacha Labourey - May 2011CloudBees - Sacha Labourey - May 2011
CloudBees - Sacha Labourey - May 2011
 
Apache Camel - Stéphane Kay - April 2011
Apache Camel - Stéphane Kay - April 2011Apache Camel - Stéphane Kay - April 2011
Apache Camel - Stéphane Kay - April 2011
 
Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...
Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...
Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...
 
OpenDS - Ludovic Poitou - December 2010
OpenDS - Ludovic Poitou - December 2010OpenDS - Ludovic Poitou - December 2010
OpenDS - Ludovic Poitou - December 2010
 
Spring Batch - Julien Jakubowski - November 2010
Spring Batch - Julien Jakubowski - November 2010Spring Batch - Julien Jakubowski - November 2010
Spring Batch - Julien Jakubowski - November 2010
 
Infinispan - Galder Zamarreno - October 2010
Infinispan - Galder Zamarreno - October 2010Infinispan - Galder Zamarreno - October 2010
Infinispan - Galder Zamarreno - October 2010
 
No Sql - Olivier Mallassi - September 2010
No Sql - Olivier Mallassi - September 2010No Sql - Olivier Mallassi - September 2010
No Sql - Olivier Mallassi - September 2010
 
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
 
Introduction à Scala - Michel Schinz - January 2010
Introduction à Scala - Michel Schinz - January 2010Introduction à Scala - Michel Schinz - January 2010
Introduction à Scala - Michel Schinz - January 2010
 
Introduction Groovy / Grails - Cyril Picat - December 2009
Introduction Groovy / Grails - Cyril Picat - December 2009Introduction Groovy / Grails - Cyril Picat - December 2009
Introduction Groovy / Grails - Cyril Picat - December 2009
 
Initiation aux tests fonctionnels - Philippe Kernevez - October 2009
Initiation aux tests fonctionnels - Philippe Kernevez - October 2009Initiation aux tests fonctionnels - Philippe Kernevez - October 2009
Initiation aux tests fonctionnels - Philippe Kernevez - October 2009
 
Sonar - Freddy Mallet - April 2009
Sonar - Freddy Mallet - April 2009Sonar - Freddy Mallet - April 2009
Sonar - Freddy Mallet - April 2009
 
Maven2 - Philippe Kernevez - March 2009
Maven2 - Philippe Kernevez - March 2009Maven2 - Philippe Kernevez - March 2009
Maven2 - Philippe Kernevez - March 2009
 
Introduction à Google Web Toolkit (GWT) - Philippe Kernevez - February 2009
Introduction à Google Web Toolkit (GWT) - Philippe Kernevez - February 2009Introduction à Google Web Toolkit (GWT) - Philippe Kernevez - February 2009
Introduction à Google Web Toolkit (GWT) - Philippe Kernevez - February 2009
 

Dernier

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Dernier (20)

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

Scripting with Java FX - Cédric Tabin - December 2007

  • 2. Agenda What is Java FX? Why Java FX? The 10 Minute Tutorial Java FX Demo! What To Do/Where To Go
  • 3. Introduction: What is Java FX? “JavaFX Script is a highly productive scripting language that enables content developers to create rich media and content for deployment on Java environments. JavaFX Script is a declarative, statically-typed programming language. It has firstclass functions, declarative syntax, list-comprehensions, and incremental dependency-based evaluation. It can make direct calls to Java APIs that are on the platform.” --https://openjfx.dev.java.net/
  • 4. Why Java FX? • Writing GUIs is hard (and annoying) > Yes, Matisse helps quite a bunch, but... > There are still too many listeners.
  • 5. Why Java FX? • Writing GUIs is hard (and annoying) > Yes, Matisse helps quite a bunch, but... > There are still too many listeners. • GUIs by default are ugly > A hierarchy of rectangular “grey boxes” (not limited to Java!) > Not as snazzy as Flash websites
  • 6. Why Java FX? • Writing GUIs is hard (and annoying) > Yes, Matisse helps quite a bunch, but... > There are still too many listeners. • GUIs by default are ugly > A hierarchy of rectangular “grey boxes” (not limited to Java!) > Not as snazzy as Flash websites • Java 2D provides much what is needed, but... > It is rather difficult to use for this purpose > It does not have “compositional” behavior Java FX's declarative syntax, combining Swing-like user-interface widgets with compositional, Java 2D-like functionality makes writing flashy graphical user interfaces easy!
  • 7. Java FX: The 10 Minute Tutorial class HelloWorldModel { attribute saying: String; } Class definition with single String attribute var model = HelloWorldModel { saying: "Hello Campus" }; Instance of the class called “model” which initializes string var win = Frame { title: bind "{model.saying} JavaFX" width: 200 content: TextField { value: bind model.saying } visible: true }; Frame with a single text field. Frame's title and text field's value is bound to model's attribute.
  • 8. Java FX: The 10 Minute Tutorial import java.lang.StringIndexOutOfBoundsException; Defining operation substring(s:String, n:Number): String { operations (i.e. try { methods) return s.substring(n); } catch (e:StringIndexOutOfBoundsException) { throw “sorry, index out of bounds”; } } Calling Java methods Can throw any object you like
  • 9. Java FX: The 10 Minute Tutorial var x = [1,2,3]; insert 10 into x; insert 12 before x[1]; delete x[. == 12]; delete x[. >= 3]; insert 5 after x[. == 1]; insert 13 as first into x; delete x; Array Initialization yields [1, 2, 3, 10] yields [1, 12, 2, 3, 10] yields [1, 2, 3, 10] yields [1, 2] yields [1, 5, 2] yields [13, 1, 5, 2] yields [] function factors(n) { return select i from i in [1..n/2] where n % i == 0; } Database-like Queries for Arrays!
  • 10. Java FX: The 10 Minute Tutorial class X { attribute nums: Number*; } trigger on new X { insert [3,4] into this.nums; } Object creation trigger Array insertion trigger Array replacement trigger trigger on insert num into X.nums { System.out.println("just inserted {num} into X.nums at position {indexof num}"); } trigger on X.num[oldValue] = newValue { System.out.println("X.num: just replaced {oldValue} with {newValue}"); }
  • 11. Java FX: The 10 Minute Tutorial import javafx.ui.canvas.*; import javafx.ui.*; Canvas object for arbitrary drawing Canvas { content: Group { transform: [rotate(20,0,0)] content: [Rect { x: 20 y: 20 height: 80 width: 300 ... }, Ellipse { cx: 150 cy: 80 ... }, }] } } Group objects together Transform groups Declarative 2D Graphics
  • 12. demo
  • 13. Java FX What to Do • Download Java FX & IDE Plugins for Netbeans or Eclipse • Join OpenJFX Java.net Project • Do Java FX Tutorials • Participate on Java FX Forums • Create something cool! http://openjfx.dev.java.net
  • 14. Java FX Resources • Java FX Project Site: http://openjfx.dev.java.net > Java.net: Download early versions of Java FX > IDE Plugins, Tutorials, Forums, FAQs > “Getting Started With the JavaFX Script Language” > “JavaFX Script 2D Graphics Tutorial” > “The JavaFX Script Programming Language Reference” • Planet FX Wiki: http://jfx.wikia.com/wiki/Main_Page > Open-source documentation site for Java FX • Chris Oliver's Blog: http://blogs.sun.com/chrisoliver/ > Latest news, other informal information > Source code for lots of demos (Space Invaders, Calculator) • Sun's Java FX Site: http://www.sun.com/software/javafx/ > Sun Microsystems official product page
  • 15. Scripting with Java FX http://openjfx.dev.java.net THANK YOU!