SlideShare a Scribd company logo
1 of 66
Download to read offline
DataFX 
From External Data to a UI Flow 
and Back 
8
About us 
Johan Vos 
@johanvos 
. www.lodgon.com 
Hendrik Ebbers 
@hendrikEbbers 
www.guigarage.com 
. 
Jonathan Giles 
@JonathanGiles 
www.fxexperience.com
Overview
Overview 
DataSources Websocket 
Injection 
Flow
DataSources
DataSources 
Goal: 
Facilitate the interaction between a JavaFX 
Application and Enterprise Data, respecting 
the commonalities and differences between 
the Enterprise World and the Client World.
DataSources 
Data 
DataFX 
DataReader 
Converter 
DataProvider 
Observable / 
ObservableList
DataSources 
iOS Desktop Client 
REST 
Business Layer 
Server 
Persistence 
Android 
Web 
Well-known, 
Well-documented 
Non-proprietary 
protocols
Protocols 
REST 
SSE 
WebSockets 
XML 
JSON 
JDBC 
File
JFX characteristics 
Observable, ObservableList 
Leverage dynamic updates to objects and lists. 
Modifications can be propagated immediately 
to JavaFX Controls. No error-prone wiring 
needed. 
JavaFX Application Thread 
Modifactions that result in UI changes should 
only happen on the JavaFX Application Thread. 
Apart from those, nothing should happen on the 
JavaFX Application Thread
DataSources 
Read Data 
REST, SSE, WebSocket 
Convert Data 
Into Java Objects 
XMLConverter, JsonConverter 
Provide Data 
As Observable instances or ObservableList 
instances
JavaFX Integration 
Using DataSources, your data (Observable) 
and data containers (ObservableList) can 
be kept up-to-date. 
JavaFX Controls often use Observable or 
ObservableList: 
Label: Label.textProperty(); 
ListView: ListView.setItems(ObservableList);
Examples 
Project Avatar 
JS on the backend 
JS on the client 
REST, SSE, WebSockets with JSON in 
between 
Avatarfx demonstrates avatar examples in 
JavaFX client
REST 
Similarity with JAX-RS 2.0 Client API 
Simple 
Builders or get/set 
OAuth support 
GET/POST/PUT/DELETE 
Classes: 
io.datafx.io.RestSource and 
io.datafx.io.RestSourceBuilder
Demo Time
SSE 
Wikipedia: 
Server-sent events is a standard describing 
how servers can initiate data transmission 
towards clients once an initial client connection 
has been established.
SSE 
Client initiates connection 
Server sends data, DataFX creates an 
Object with Observable fields 
Every now and then, server sends updated 
data 
DataFX makes sure the Observable fields 
are updated
Demo Time
WebSockets 
Leverage client-part of JSR 356, Java 
standard for WebSocket protocol. 
Works with any service that supports the 
WebSocket protocol 
DataFX retrieves incoming messages, and 
populates an ObservableList
Demo Time
Add
Concurrency
Concurrency API 
JavaFX is a single threaded toolkit 
You should not block the platform thread 
Rest calls may take some time... 
...and could freeze the application
DataFX Executor 
Executor implementation 
supports title, message and progress for 
each service 
supports Runnable, Callable, Service & 
Task 
cancel services on the gui 
Configurable Thread Pool
Demo Time
Let‘s wait 
like SwingUtilities.invokeAndWait(...) 
void ConcurrentUtils.runAndWait(Runnable runnable) 
T ConcurrentUtils.runAndWait(Callable<T> callable) 
we will collect all 
concurrent helper 
methods here
Stream Support 
JDK 8 has Lambdas and the awesome 
Stream API 
Map and reduce your collections in 
parallel 
But how to turn into the JavaFX 
application thread?
Stream Support 
StreamFX<T> streamFX = new StreamFX<>(myStream); 
it is a wrapper 
ObservableList<T> list = ...; 
streamFX.publish(list); 
! 
! 
! 
streamFX.forEachOrdered(final 
Consumer<ObjectProperty<? super T>> action) 
this will happen in the 
application thread
Process Chain 
Like SwingWorker on steroids 
Support for an unlimited chain of 
background and application tasks 
ExceptionHandling 
Publisher support
Process Chain 
ProcessChain.create(). 
addRunnableInPlatformThread(() -> blockUI()). 
addSupplierInExecutor(() -> loadFromServer()). 
addConsumerInPlatformThread(d -> updateUI(d)). 
onException(e -> handleException(e)). 
withFinal(() -> unblockUI()). 
run();
Demo Time
Concurrency API 
DataFX core contains all basic classes 
Can be integrated in all applications 
Exception Handling 
Java8 Lambda support 
Configuration of thread pool 
Add async operations the easy way
Flow API
JavaFX Basics 
In JavaFX you should use FXML to 
define your views 
You can define a controller for the view 
Link from (FXML-) view to the controller 
<HBox fx:controller="com.guigarage.MyController"> 
<TextField fx:id="myTextfield"/> 
<Button fx:id="backButton" text="back"/> 
</HBox>
View Controller 
Some kind of inversion of control 
Define the FXML in your controller class 
Create a view by using the controller class
View Controller 
@FXMLController("Details.fxml") 
public class DetailViewController { 
@FXML 
private TextField myTextfield; 
@FXML 
private Button backButton; 
@PostConstruct 
public void init() { 
myTextfield.setText("Hello!"); 
} 
} 
define the 
FXML file 
default Java 
annotation
View Context 
Support of different contexts 
Inject context by using Annotation 
Register your model to the context 
PlugIn mechanism
Flow API 
The View Controller is good for one view 
How to link different view?
Flow API 
open View View 
View 
View 
View 
View 
search 
details 
open 
diagram 
setting *
Master Detail 
two views: master and detail 
use FXML 
switch from one view to the other one 
delete data on user action 
decoupling all this stuff!!
Master Detail 
details 
MasterView DetailsView 
back 
delete
Master Detail 
details 
delete 
MasterView DetailsView 
back 
FXML Controller FXML Controller
Master Detail 
details 
MasterView DetailsView 
Flow flow = new Flow(MasterViewController.class). 
withLink(MasterViewController.class, "details", DetailsViewController.class). 
withLink(EditViewController.class, "back", MasterViewController.class). 
direct link between the views 
action id 
back 
delete
Master Detail 
details 
MasterView DetailsView 
define a custom action … 
Flow flow = new Flow(MasterViewController.class). 
. . . 
withTaskAction(MasterViewController.class, "delete", RemoveAction.class); 
! 
! 
! 
action name 
withTaskAction(MasterViewController.class, "delete", () -> . . .); 
delete 
back 
delete 
… or a Lambda
Master Detail 
Use controller API for all views 
Define a Flow with all views 
link with by adding an action 
add custom actions to your flow 
but how can I use them?
Master Detail 
@FXMLController("Details.fxml") 
public class DetailViewController { 
! 
@FXML 
@ActionTrigger("back") 
private Button backButton; 
@PostConstruct 
public void init() { 
//... 
} 
@PreDestroy 
public void destroy() { 
//... 
} 
} 
controller API 
defined 
in FXML bind your flow 
actions by annotation 
listen to the 
flow
Master Detail 
bind it by id 
@FXMLController("Details.fxml") 
public class DetailViewController { 
! 
@FXML 
@ActionTrigger("delete") 
private Button backButton; 
@PostConstruct 
public void init() { 
//... 
} 
@ActionMethod("delete") 
public void delete() { 
//... 
} 
}
Flow API 
share your data model by using contexts 
ViewFlowContext added 
@FXMLViewFlowContext 
private ViewFlowContext context; 
You can inject contexts in your 
action classes, too 
@PostConstruct and @PreDestroy are 
covered by the view livecycle
Flow API 
Provides several action types like 
BackAction 
@BackAction 
private Button backButton; 
(Animated) Flow Container as a wrapper 
DataFX Core ExceptionHandler is used 
Flows are reusable
Demo Time
Flow API 
By using the flow API you don‘t have 
dependencies between the views 
Reuse views and actions 
Use annotations for configuration
Injection API
Injection API 
By using the flow api you can inject 
DataFX related classes 
But how can you inject any data?
Injection API 
Based on JSR 330 and JSR 299 
Developed as plugin of the flow API 
Use default annotations
Injection API 
ViewScope: Data only lives in one View 
FlowScope: Data only lives in one Flow 
ApplicationScope: Data lives in one App 
DependentScope: Data will be recreated
Demo Time
Injection API 
It’s not a complete CDI implementation! 
Qualifier, etc. are currently not supported 
No default CDI implementation is used 
Weld and OpenWebBeans core modules 
are Java EE specific
Injection API 
Inject your data in the view controller 
Define the scope of data types 
Add your own scope
DataFX Labs
Validation API 
Use of Java Bean Validation (JSR 303) 
Developed as a Flow API plugin 
Supports the JavaFX property API 
public class ValidateableDataModel { 
@NotNull 
private StringProperty name; 
}
Validation API 
@FXMLController("view.fxml") 
public class ValidationController { 
@Valid 
private ValidateableDataModel model; 
@Validator 
private ValidatorFX<ValidationController> validator; 
public void onAction() { 
validator.validateAllProperties(); 
} 
}
EJB Support 
Access remote EJBs on your client 
Developed as a Flow API plugin 
API & a experimental WildFly 
implementation
EJB Support 
@FXMLController("view.fxml") 
public class ViewController { 
! 
@RemoteEjb() 
RemoteCalculator calc; 
! 
@FXML 
@ActionTrigger("add") 
Button myButton; 
! 
@ActionMethod("add") 
public void add() { 
runInBackground(() -> sysout(calc.add(3, 3))); 
} 
! 
}
Feature Toggles 
Integrate feature toggles in the view 
Developed as a Flow API plugin 
@FXMLController("featureView.fxml") 
public class FeatureController { 
! 
@FXML 
@HideByFeature("PLAY_FEATURE") 
private Button playButton; 
! 
@FXML 
@DisabledByFeature("FEATURE2") 
private Button button2; 
! 
}
www.datafx.io
QA

More Related Content

What's hot

JavaFX – 10 things I love about you
JavaFX – 10 things I love about youJavaFX – 10 things I love about you
JavaFX – 10 things I love about youAlexander Casall
 
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)Stephen Chin
 
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedJetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedToru Wonyoung Choi
 
What's New in Java 8
What's New in Java 8What's New in Java 8
What's New in Java 8javafxpert
 
Spring MVC
Spring MVCSpring MVC
Spring MVCyuvalb
 
Building an app with Google's new suites
Building an app with Google's new suitesBuilding an app with Google's new suites
Building an app with Google's new suitesToru Wonyoung Choi
 
Web注入+http漏洞等描述
Web注入+http漏洞等描述Web注入+http漏洞等描述
Web注入+http漏洞等描述fangjiafu
 
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
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web ApplicationYakov Fain
 
Getting started with Java 9 modules
Getting started with Java 9 modulesGetting started with Java 9 modules
Getting started with Java 9 modulesRafael Winterhalter
 
Lecture 3: Servlets - Session Management
Lecture 3:  Servlets - Session ManagementLecture 3:  Servlets - Session Management
Lecture 3: Servlets - Session ManagementFahad Golra
 
Java fx smart code econ
Java fx smart code econJava fx smart code econ
Java fx smart code econTom Schindl
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOPDzmitry Naskou
 
Java servlet life cycle - methods ppt
Java servlet life cycle - methods pptJava servlet life cycle - methods ppt
Java servlet life cycle - methods pptkamal kotecha
 
Using the Tooling API to Generate Apex SOAP Web Service Clients
Using the Tooling API to Generate Apex SOAP Web Service ClientsUsing the Tooling API to Generate Apex SOAP Web Service Clients
Using the Tooling API to Generate Apex SOAP Web Service ClientsDaniel Ballinger
 
Jdbc example program with access and MySql
Jdbc example program with access and MySqlJdbc example program with access and MySql
Jdbc example program with access and MySqlkamal kotecha
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depthVinay Kumar
 

What's hot (20)

JavaFX – 10 things I love about you
JavaFX – 10 things I love about youJavaFX – 10 things I love about you
JavaFX – 10 things I love about you
 
Java Enterprise Edition
Java Enterprise EditionJava Enterprise Edition
Java Enterprise Edition
 
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
 
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedJetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO Extended
 
What's New in Java 8
What's New in Java 8What's New in Java 8
What's New in Java 8
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Building an app with Google's new suites
Building an app with Google's new suitesBuilding an app with Google's new suites
Building an app with Google's new suites
 
Web注入+http漏洞等描述
Web注入+http漏洞等描述Web注入+http漏洞等描述
Web注入+http漏洞等描述
 
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)
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web Application
 
Getting started with Java 9 modules
Getting started with Java 9 modulesGetting started with Java 9 modules
Getting started with Java 9 modules
 
Lecture 3: Servlets - Session Management
Lecture 3:  Servlets - Session ManagementLecture 3:  Servlets - Session Management
Lecture 3: Servlets - Session Management
 
Java fx smart code econ
Java fx smart code econJava fx smart code econ
Java fx smart code econ
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
 
Java servlet life cycle - methods ppt
Java servlet life cycle - methods pptJava servlet life cycle - methods ppt
Java servlet life cycle - methods ppt
 
Spring Core
Spring CoreSpring Core
Spring Core
 
Using the Tooling API to Generate Apex SOAP Web Service Clients
Using the Tooling API to Generate Apex SOAP Web Service ClientsUsing the Tooling API to Generate Apex SOAP Web Service Clients
Using the Tooling API to Generate Apex SOAP Web Service Clients
 
Jdbc example program with access and MySql
Jdbc example program with access and MySqlJdbc example program with access and MySql
Jdbc example program with access and MySql
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depth
 
struts
strutsstruts
struts
 

Viewers also liked

Check style 기초가이드
Check style 기초가이드Check style 기초가이드
Check style 기초가이드rupert kim
 
JavaFX JumpStart @JavaOne 2016
JavaFX JumpStart @JavaOne 2016JavaFX JumpStart @JavaOne 2016
JavaFX JumpStart @JavaOne 2016Hendrik Ebbers
 
BUILDING MODERN WEB UIS WITH WEB COMPONENTS @ Devoxx
BUILDING MODERN WEB UIS WITH WEB COMPONENTS @ DevoxxBUILDING MODERN WEB UIS WITH WEB COMPONENTS @ Devoxx
BUILDING MODERN WEB UIS WITH WEB COMPONENTS @ DevoxxHendrik Ebbers
 
JavaFX - Straight from the trenches
JavaFX - Straight from the trenchesJavaFX - Straight from the trenches
JavaFX - Straight from the trenchesAnderson Braz
 
UI test automation techniques by an example of JavaFX UI
UI test automation techniques by an example of JavaFX UIUI test automation techniques by an example of JavaFX UI
UI test automation techniques by an example of JavaFX UIyaevents
 
Java Fx - Return of client Java
Java Fx - Return of client JavaJava Fx - Return of client Java
Java Fx - Return of client JavaShuji Watanabe
 
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 Layout Secrets with Amy Fowler
JavaFX Layout Secrets with Amy FowlerJavaFX Layout Secrets with Amy Fowler
JavaFX Layout Secrets with Amy FowlerStephen Chin
 

Viewers also liked (14)

Check style 기초가이드
Check style 기초가이드Check style 기초가이드
Check style 기초가이드
 
JavaFX JumpStart @JavaOne 2016
JavaFX JumpStart @JavaOne 2016JavaFX JumpStart @JavaOne 2016
JavaFX JumpStart @JavaOne 2016
 
BUILDING MODERN WEB UIS WITH WEB COMPONENTS @ Devoxx
BUILDING MODERN WEB UIS WITH WEB COMPONENTS @ DevoxxBUILDING MODERN WEB UIS WITH WEB COMPONENTS @ Devoxx
BUILDING MODERN WEB UIS WITH WEB COMPONENTS @ Devoxx
 
Delivering unicorns
Delivering unicornsDelivering unicorns
Delivering unicorns
 
JavaFX - Straight from the trenches
JavaFX - Straight from the trenchesJavaFX - Straight from the trenches
JavaFX - Straight from the trenches
 
UI test automation techniques by an example of JavaFX UI
UI test automation techniques by an example of JavaFX UIUI test automation techniques by an example of JavaFX UI
UI test automation techniques by an example of JavaFX UI
 
Java Fx - Return of client Java
Java Fx - Return of client JavaJava Fx - Return of client Java
Java Fx - Return of client Java
 
From Swing to JavaFX
From Swing to JavaFXFrom Swing to JavaFX
From Swing to JavaFX
 
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 Overview
JavaFX OverviewJavaFX Overview
JavaFX Overview
 
JavaFX in Action Part I
JavaFX in Action Part IJavaFX in Action Part I
JavaFX in Action Part I
 
JavaFX Layout Secrets with Amy Fowler
JavaFX Layout Secrets with Amy FowlerJavaFX Layout Secrets with Amy Fowler
JavaFX Layout Secrets with Amy Fowler
 
JavaFX Presentation
JavaFX PresentationJavaFX Presentation
JavaFX Presentation
 
애자일의 모든것
애자일의 모든것애자일의 모든것
애자일의 모든것
 

Similar to DataFX 8 (JavaOne 2014)

Effective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsEffective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsSrikanth Shenoy
 
SpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptxSpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptxSUFYAN SATTAR
 
Introduction to jsf2
Introduction to jsf2Introduction to jsf2
Introduction to jsf2Rajiv Gupta
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Jonas Follesø
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksSunil Patil
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworksSunil Patil
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Tuna Tore
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892Tuna Tore
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentChui-Wen Chiu
 
MVC3 Development with visual studio 2010
MVC3 Development with visual studio 2010MVC3 Development with visual studio 2010
MVC3 Development with visual studio 2010AbhishekLuv Kumar
 
Spring 3: What's New
Spring 3: What's NewSpring 3: What's New
Spring 3: What's NewTed Pennings
 
Labs And Walkthroughs
Labs And WalkthroughsLabs And Walkthroughs
Labs And WalkthroughsBryan Tuttle
 
I really need help on this question.Create a program that allows t.pdf
I really need help on this question.Create a program that allows t.pdfI really need help on this question.Create a program that allows t.pdf
I really need help on this question.Create a program that allows t.pdfamitbagga0808
 

Similar to DataFX 8 (JavaOne 2014) (20)

Effective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsEffective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjects
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
SpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptxSpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptx
 
Jdbc
JdbcJdbc
Jdbc
 
Introduction to jsf2
Introduction to jsf2Introduction to jsf2
Introduction to jsf2
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
 
MVC
MVCMVC
MVC
 
MVC3 Development with visual studio 2010
MVC3 Development with visual studio 2010MVC3 Development with visual studio 2010
MVC3 Development with visual studio 2010
 
JEE5 New Features
JEE5 New FeaturesJEE5 New Features
JEE5 New Features
 
Spring 3: What's New
Spring 3: What's NewSpring 3: What's New
Spring 3: What's New
 
Jsf presentation
Jsf presentationJsf presentation
Jsf presentation
 
Labs And Walkthroughs
Labs And WalkthroughsLabs And Walkthroughs
Labs And Walkthroughs
 
Servlets
ServletsServlets
Servlets
 
I really need help on this question.Create a program that allows t.pdf
I really need help on this question.Create a program that allows t.pdfI really need help on this question.Create a program that allows t.pdf
I really need help on this question.Create a program that allows t.pdf
 

More from Hendrik Ebbers

Java APIs- The missing manual (concurrency)
Java APIs- The missing manual (concurrency)Java APIs- The missing manual (concurrency)
Java APIs- The missing manual (concurrency)Hendrik Ebbers
 
Beauty & the Beast - Java VS TypeScript
Beauty & the Beast - Java VS TypeScriptBeauty & the Beast - Java VS TypeScript
Beauty & the Beast - Java VS TypeScriptHendrik Ebbers
 
Java APIs - the missing manual
Java APIs - the missing manualJava APIs - the missing manual
Java APIs - the missing manualHendrik Ebbers
 
Multidevice Controls: A Different Approach to UX
Multidevice Controls: A Different Approach to UXMultidevice Controls: A Different Approach to UX
Multidevice Controls: A Different Approach to UXHendrik Ebbers
 
Java WebStart Is Dead: What Should We Do Now?
Java WebStart Is Dead: What Should We Do Now?Java WebStart Is Dead: What Should We Do Now?
Java WebStart Is Dead: What Should We Do Now?Hendrik Ebbers
 
Java ap is you should know
Java ap is you should knowJava ap is you should know
Java ap is you should knowHendrik Ebbers
 
Web Components & Polymer 1.0 (Webinale Berlin)
Web Components & Polymer 1.0 (Webinale Berlin)Web Components & Polymer 1.0 (Webinale Berlin)
Web Components & Polymer 1.0 (Webinale Berlin)Hendrik Ebbers
 
webcomponents (Jfokus 2015)
webcomponents (Jfokus 2015)webcomponents (Jfokus 2015)
webcomponents (Jfokus 2015)Hendrik Ebbers
 
Feature driven development
Feature driven developmentFeature driven development
Feature driven developmentHendrik Ebbers
 
Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Hendrik Ebbers
 
Devoxx UK 2013: Sandboxing with the Vagrant-Binding API
Devoxx UK 2013: Sandboxing with the Vagrant-Binding APIDevoxx UK 2013: Sandboxing with the Vagrant-Binding API
Devoxx UK 2013: Sandboxing with the Vagrant-Binding APIHendrik Ebbers
 
Vagrant-Binding JUG Dortmund
Vagrant-Binding JUG DortmundVagrant-Binding JUG Dortmund
Vagrant-Binding JUG DortmundHendrik Ebbers
 
Lightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and PuppetLightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and PuppetHendrik Ebbers
 

More from Hendrik Ebbers (19)

Java Desktop 2019
Java Desktop 2019Java Desktop 2019
Java Desktop 2019
 
Java APIs- The missing manual (concurrency)
Java APIs- The missing manual (concurrency)Java APIs- The missing manual (concurrency)
Java APIs- The missing manual (concurrency)
 
Beauty & the Beast - Java VS TypeScript
Beauty & the Beast - Java VS TypeScriptBeauty & the Beast - Java VS TypeScript
Beauty & the Beast - Java VS TypeScript
 
Java 11 OMG
Java 11 OMGJava 11 OMG
Java 11 OMG
 
Java APIs - the missing manual
Java APIs - the missing manualJava APIs - the missing manual
Java APIs - the missing manual
 
Multidevice Controls: A Different Approach to UX
Multidevice Controls: A Different Approach to UXMultidevice Controls: A Different Approach to UX
Multidevice Controls: A Different Approach to UX
 
Java WebStart Is Dead: What Should We Do Now?
Java WebStart Is Dead: What Should We Do Now?Java WebStart Is Dead: What Should We Do Now?
Java WebStart Is Dead: What Should We Do Now?
 
Java ap is you should know
Java ap is you should knowJava ap is you should know
Java ap is you should know
 
Web Components & Polymer 1.0 (Webinale Berlin)
Web Components & Polymer 1.0 (Webinale Berlin)Web Components & Polymer 1.0 (Webinale Berlin)
Web Components & Polymer 1.0 (Webinale Berlin)
 
webcomponents (Jfokus 2015)
webcomponents (Jfokus 2015)webcomponents (Jfokus 2015)
webcomponents (Jfokus 2015)
 
Feature driven development
Feature driven developmentFeature driven development
Feature driven development
 
Extreme Gui Makeover
Extreme Gui MakeoverExtreme Gui Makeover
Extreme Gui Makeover
 
JavaFX Enterprise
JavaFX EnterpriseJavaFX Enterprise
JavaFX Enterprise
 
Bonjour for Java
Bonjour for JavaBonjour for Java
Bonjour for Java
 
Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013
 
Devoxx UK 2013: Sandboxing with the Vagrant-Binding API
Devoxx UK 2013: Sandboxing with the Vagrant-Binding APIDevoxx UK 2013: Sandboxing with the Vagrant-Binding API
Devoxx UK 2013: Sandboxing with the Vagrant-Binding API
 
Vagrant-Binding JUG Dortmund
Vagrant-Binding JUG DortmundVagrant-Binding JUG Dortmund
Vagrant-Binding JUG Dortmund
 
Lightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and PuppetLightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and Puppet
 
Jgrid
JgridJgrid
Jgrid
 

Recently uploaded

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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 textsMaria Levchenko
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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 WorkerThousandEyes
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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.pptxHampshireHUG
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

DataFX 8 (JavaOne 2014)

  • 1. DataFX From External Data to a UI Flow and Back 8
  • 2. About us Johan Vos @johanvos . www.lodgon.com Hendrik Ebbers @hendrikEbbers www.guigarage.com . Jonathan Giles @JonathanGiles www.fxexperience.com
  • 6. DataSources Goal: Facilitate the interaction between a JavaFX Application and Enterprise Data, respecting the commonalities and differences between the Enterprise World and the Client World.
  • 7. DataSources Data DataFX DataReader Converter DataProvider Observable / ObservableList
  • 8. DataSources iOS Desktop Client REST Business Layer Server Persistence Android Web Well-known, Well-documented Non-proprietary protocols
  • 9. Protocols REST SSE WebSockets XML JSON JDBC File
  • 10. JFX characteristics Observable, ObservableList Leverage dynamic updates to objects and lists. Modifications can be propagated immediately to JavaFX Controls. No error-prone wiring needed. JavaFX Application Thread Modifactions that result in UI changes should only happen on the JavaFX Application Thread. Apart from those, nothing should happen on the JavaFX Application Thread
  • 11. DataSources Read Data REST, SSE, WebSocket Convert Data Into Java Objects XMLConverter, JsonConverter Provide Data As Observable instances or ObservableList instances
  • 12. JavaFX Integration Using DataSources, your data (Observable) and data containers (ObservableList) can be kept up-to-date. JavaFX Controls often use Observable or ObservableList: Label: Label.textProperty(); ListView: ListView.setItems(ObservableList);
  • 13. Examples Project Avatar JS on the backend JS on the client REST, SSE, WebSockets with JSON in between Avatarfx demonstrates avatar examples in JavaFX client
  • 14. REST Similarity with JAX-RS 2.0 Client API Simple Builders or get/set OAuth support GET/POST/PUT/DELETE Classes: io.datafx.io.RestSource and io.datafx.io.RestSourceBuilder
  • 16. SSE Wikipedia: Server-sent events is a standard describing how servers can initiate data transmission towards clients once an initial client connection has been established.
  • 17. SSE Client initiates connection Server sends data, DataFX creates an Object with Observable fields Every now and then, server sends updated data DataFX makes sure the Observable fields are updated
  • 19. WebSockets Leverage client-part of JSR 356, Java standard for WebSocket protocol. Works with any service that supports the WebSocket protocol DataFX retrieves incoming messages, and populates an ObservableList
  • 21. Add
  • 23. Concurrency API JavaFX is a single threaded toolkit You should not block the platform thread Rest calls may take some time... ...and could freeze the application
  • 24. DataFX Executor Executor implementation supports title, message and progress for each service supports Runnable, Callable, Service & Task cancel services on the gui Configurable Thread Pool
  • 26. Let‘s wait like SwingUtilities.invokeAndWait(...) void ConcurrentUtils.runAndWait(Runnable runnable) T ConcurrentUtils.runAndWait(Callable<T> callable) we will collect all concurrent helper methods here
  • 27. Stream Support JDK 8 has Lambdas and the awesome Stream API Map and reduce your collections in parallel But how to turn into the JavaFX application thread?
  • 28. Stream Support StreamFX<T> streamFX = new StreamFX<>(myStream); it is a wrapper ObservableList<T> list = ...; streamFX.publish(list); ! ! ! streamFX.forEachOrdered(final Consumer<ObjectProperty<? super T>> action) this will happen in the application thread
  • 29. Process Chain Like SwingWorker on steroids Support for an unlimited chain of background and application tasks ExceptionHandling Publisher support
  • 30. Process Chain ProcessChain.create(). addRunnableInPlatformThread(() -> blockUI()). addSupplierInExecutor(() -> loadFromServer()). addConsumerInPlatformThread(d -> updateUI(d)). onException(e -> handleException(e)). withFinal(() -> unblockUI()). run();
  • 32. Concurrency API DataFX core contains all basic classes Can be integrated in all applications Exception Handling Java8 Lambda support Configuration of thread pool Add async operations the easy way
  • 34. JavaFX Basics In JavaFX you should use FXML to define your views You can define a controller for the view Link from (FXML-) view to the controller <HBox fx:controller="com.guigarage.MyController"> <TextField fx:id="myTextfield"/> <Button fx:id="backButton" text="back"/> </HBox>
  • 35. View Controller Some kind of inversion of control Define the FXML in your controller class Create a view by using the controller class
  • 36. View Controller @FXMLController("Details.fxml") public class DetailViewController { @FXML private TextField myTextfield; @FXML private Button backButton; @PostConstruct public void init() { myTextfield.setText("Hello!"); } } define the FXML file default Java annotation
  • 37. View Context Support of different contexts Inject context by using Annotation Register your model to the context PlugIn mechanism
  • 38. Flow API The View Controller is good for one view How to link different view?
  • 39. Flow API open View View View View View View search details open diagram setting *
  • 40. Master Detail two views: master and detail use FXML switch from one view to the other one delete data on user action decoupling all this stuff!!
  • 41. Master Detail details MasterView DetailsView back delete
  • 42. Master Detail details delete MasterView DetailsView back FXML Controller FXML Controller
  • 43. Master Detail details MasterView DetailsView Flow flow = new Flow(MasterViewController.class). withLink(MasterViewController.class, "details", DetailsViewController.class). withLink(EditViewController.class, "back", MasterViewController.class). direct link between the views action id back delete
  • 44. Master Detail details MasterView DetailsView define a custom action … Flow flow = new Flow(MasterViewController.class). . . . withTaskAction(MasterViewController.class, "delete", RemoveAction.class); ! ! ! action name withTaskAction(MasterViewController.class, "delete", () -> . . .); delete back delete … or a Lambda
  • 45. Master Detail Use controller API for all views Define a Flow with all views link with by adding an action add custom actions to your flow but how can I use them?
  • 46. Master Detail @FXMLController("Details.fxml") public class DetailViewController { ! @FXML @ActionTrigger("back") private Button backButton; @PostConstruct public void init() { //... } @PreDestroy public void destroy() { //... } } controller API defined in FXML bind your flow actions by annotation listen to the flow
  • 47. Master Detail bind it by id @FXMLController("Details.fxml") public class DetailViewController { ! @FXML @ActionTrigger("delete") private Button backButton; @PostConstruct public void init() { //... } @ActionMethod("delete") public void delete() { //... } }
  • 48. Flow API share your data model by using contexts ViewFlowContext added @FXMLViewFlowContext private ViewFlowContext context; You can inject contexts in your action classes, too @PostConstruct and @PreDestroy are covered by the view livecycle
  • 49. Flow API Provides several action types like BackAction @BackAction private Button backButton; (Animated) Flow Container as a wrapper DataFX Core ExceptionHandler is used Flows are reusable
  • 51. Flow API By using the flow API you don‘t have dependencies between the views Reuse views and actions Use annotations for configuration
  • 53. Injection API By using the flow api you can inject DataFX related classes But how can you inject any data?
  • 54. Injection API Based on JSR 330 and JSR 299 Developed as plugin of the flow API Use default annotations
  • 55. Injection API ViewScope: Data only lives in one View FlowScope: Data only lives in one Flow ApplicationScope: Data lives in one App DependentScope: Data will be recreated
  • 57. Injection API It’s not a complete CDI implementation! Qualifier, etc. are currently not supported No default CDI implementation is used Weld and OpenWebBeans core modules are Java EE specific
  • 58. Injection API Inject your data in the view controller Define the scope of data types Add your own scope
  • 60. Validation API Use of Java Bean Validation (JSR 303) Developed as a Flow API plugin Supports the JavaFX property API public class ValidateableDataModel { @NotNull private StringProperty name; }
  • 61. Validation API @FXMLController("view.fxml") public class ValidationController { @Valid private ValidateableDataModel model; @Validator private ValidatorFX<ValidationController> validator; public void onAction() { validator.validateAllProperties(); } }
  • 62. EJB Support Access remote EJBs on your client Developed as a Flow API plugin API & a experimental WildFly implementation
  • 63. EJB Support @FXMLController("view.fxml") public class ViewController { ! @RemoteEjb() RemoteCalculator calc; ! @FXML @ActionTrigger("add") Button myButton; ! @ActionMethod("add") public void add() { runInBackground(() -> sysout(calc.add(3, 3))); } ! }
  • 64. Feature Toggles Integrate feature toggles in the view Developed as a Flow API plugin @FXMLController("featureView.fxml") public class FeatureController { ! @FXML @HideByFeature("PLAY_FEATURE") private Button playButton; ! @FXML @DisabledByFeature("FEATURE2") private Button button2; ! }
  • 66. QA