SlideShare ist ein Scribd-Unternehmen logo
1 von 92
Downloaden Sie, um offline zu lesen
V A A D I N 8 A N D B E Y O N D
5
S T O R Y A N D P H I L O S O P H Y
Software is eating the world and what most of us see of it is the user interface. The user
interface has become the key component of how the users experience the business
behind it. Competition is lost or won due to user experience. Simplicity is king and the
users get frustrated by anything ugly, slow or not working on the device they happen to
use at the time. We at Vaadin fight for simplicity and invite everyone to join this fight.
Together we want to build a user interface that puts a smile on the user’s face.
Vaadin is the technology that empowers developers to build the best web-apps for
business purposes. Our priority over everything else is developer productivity because
we believe that by simplifying the developer experience and saving the developer’s
time, they are best able to focus on building great user interfaces.
Our brand is what we want everyone to think about us. When everyone - both us and
the people around us - have a consistent understanding of what Vaadin is and what we
stand for, it enables that image to spread and amplify. This book defines what we want
that image to be. It defines what the Vaadin brand is.
I hope that You are as excited and proud of living and breathing the Vaadin brand as
I am. You are the one who is shaping what everyone thinks about Vaadin - using this
brand as a tool and a guideline every day.
Let’s fight for simplicity for both the users and the developers!
Joonas Lehtinen
Founder & CEO
Vaadin
I N T R O D U C T I O N
@ M A R C U S H E L L B E R G # V A A D I N 8
things we'll look at
1. What's new in Vaadin 8
2. How you upgrade to Vaadin 8
3. What's next for Vaadin
W H AT ' S N E W ?
B R E A K I N G C H A N G E S
B R E A K I N G C H A N G E S
Only Java 8 + supported
B R E A K I N G C H A N G E S
Only Java 8 + supported
Dropped support for IE 8, 9, and 10
B R E A K I N G C H A N G E S
Only Java 8 + supported
Dropped support for IE 8, 9, and 10
Requires Servlet 3.0+ Container
B R E A K I N G C H A N G E S
Only Java 8 + supported
Dropped support for IE 8, 9, and 10
Requires Servlet 3.0+ Container
All themes except Valo are dropped
R . I . P .
C O N TA I N E R , I T E M & P R O P E R T Y
B I N D I N G T O A C O L L E C T I O N
BeanItemContainer<Person> container =
new BeanItemContainer(Person.class, persons);
Grid grid = new Grid();
grid.setContainerDataSource(container);
List<Person> persons = Backend.getPersons();
B I N D I N G T O A C O L L E C T I O N
List<Person> persons = Backend.getPersons();
Grid<Person> grid = new Grid<>(Person.class);
grid.setItems(persons);
1 0 X L E S S M E M O R Y U S A G E
1 0 X L E S S M E M O R Y U S A G E ( ! )
1 0 X L E S S M E M O R Y U S A G E ( ! )
S I G N I F I C A N T L Y L O W E R C P U U S A G E
D E F I N I N G C O L U M N S
Grid grid = new Grid();
grid.setContainerDataSource(new BeanItemContainer<>(persons));
grid.removeAllColumns();
grid.addColumn("firstName");
grid.getColumn("firstName").setHeaderCaption("First Name");
grid.addColumn("lastName");
List<Person> persons = Backend.getPersons();
D E F I N I N G C O L U M N S
Grid<Person> grid = new Grid<>();
grid.setItems(persons);
grid.addColumn(Person::getFirstName).setCaption("First Name");
grid.addColumn(Person::getLastName).setCaption("Last Name");
List<Person> persons = Backend.getPersons();
L A Z Y L O A D I N G
L A Z Y L O A D I N G
grid.setDataProvider(
(sortOrder, offset, limit) -> service.findAll(offset, limit),
() -> service.count()
);
C U S T O M C A P T I O N S
List<Person> persons = Backend.getPersons();
ComboBox comboBox = new ComboBox();
BeanItemContainer<Person> bic =
new BeanItemContainer<>(persons);
GeneratedPropertyContainer gpc =
new GeneratedPropertyContainer(bic);
gpc.addGeneratedProperty("name",
new PropertyValueGenerator<String>() {
@Override
public String getValue(
Item i, Object id, Object o1) {
Person p = (Person) id;
return
p.getFirstName() + " " + p.getLastName();
}
C U S T O M C A P T I O N S
String fullname =
genItem.getItemProperty("name")
.getValue().toString();
return fullname.toLowerCase().startsWith(
ssf.getFilterString());
}
@Override
public boolean appliesToProperty(
Object propertyId) {
return "name".equals(propertyId);
}
}
}
});
comboBox.setItemCaptionPropertyId("name");
comboBox.setContainerDataSource(gpc);
C U S T O M C A P T I O N S
List<Person> persons = Backend.getPersons();
ComboBox<Person> comboBox = new ComboBox<>();
comboBox.setItemCaptionGenerator(
p -> p.getFirstName() + " " + p.getLastName()
);
comboBox.setItems(persons);
T Y P E S A F E E V E N T S
comboBox.addValueChangeListener(evt -> {
Person p = (Person) evt.getProperty().getValue();
assert(p.getName().equals("John"));
});
T Y P E S A F E E V E N T S
comboBox.addValueChangeListener(evt -> {
assert(evt.getValue().getName().equals("John"));
});
N U L L R E P R E S E N TAT I O N
B I N D I N G T O F I E L D S
class PatientFormLayout extends FormLayout {
TextField firstName;
TextField middleName;
TextField lastName;
}
PatientFormLayout form = new PatientFormLayout();
Binder<Patient> binder = new Binder<>(Patient.class);
binder.bindInstanceFields(formLayout);
B I N D I N G T O F I E L D S
class PatientFormLayout extends FormLayout {
TextField firstName;
TextField middleName;
TextField lastName;
Binder<Patient> binder = new Binder<>(Patient.class);
binder.forField(firstName)
.withValidator(str -> str.length() > 4, "Name too short")
.bind("firstName");
}
E A G E R V A L I D AT I O N
E A G E R V A L I D AT I O N
N E W L A Y O U T D E F A U L T S
N E W L A Y O U T D E F A U L T S
A U T O M AT I C E X P A N D
HorizontalLayout header = new HorizontalLayout(title, logout);
VerticalLayout root = new VerticalLayout(header, grid);
grid.setSizeFull();
root.setExpandRatio(grid, 1);
root.setSizeFull();
A U T O M AT I C E X P A N D
HorizontalLayout header = new HorizontalLayout(title, logout);
VerticalLayout root = new VerticalLayout(header);
root.addComponentsAndExpand(grid);
V A A D I N 8 . 1 I M P R O V E M E N T S
T R E E G R I D
T R E E G R I D
C O M P O N E N T S I N G R I D
C O M P O N E N T S I N G R I D
H T M L 5 D R A G A N D D R O P
H T M L 5 D R A G A N D D R O P
T O U C H K I T I S N O W O P E N S O U R C E
V A A D I N 6 E N D O F L I F E
2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025
9
6
3
7
8
Fo r wards Comp atib le
GUARANTEED SUPPORT
≥ 5 years for a major release
≥ 2 latest major releases
(after that support is available on time and materials basis)
?
5
4
guaranteed
guaranteed
guaranteed
guaranteed
migration path
migration path
M A K I N G T H E J U M P T O 8
T W O U P G R A D E P AT H S
vaadin-server 7.x
T W O U P G R A D E P AT H S
vaadin-server 7.x
T W O U P G R A D E P AT H S
vaadin-server 7.x
vaadin-server 8.x
T W O U P G R A D E P AT H S
vaadin-server 7.x
vaadin-compatibility-server 8.x
vaadin-server 8.x
T W O U P G R A D E P AT H S
vaadin-server 7.x
vaadin-compatibility-server 8.x
vaadin-server 8.x
U P D AT E P A C K A G E
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
<version>7.7.6</version>
</dependency>
U P D AT E P A C K A G E
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-compatibility-server</artifactId>
<version>8.0.0</version>
</dependency>
C O M P AT I B I L I T Y S E R V E R
C O M P AT I B I L I T Y S E R V E R
U P D AT E F O R M S
Change FieldGroups to Binders
Move validators from Fields to Binder
Update Converters to new interface
R E M O V E C O N TA I N E R S
Change BeanItem/IndexedContainers to setItems
Lazy containers should instead use dataProvider
D R O P C O M P AT I B I L I T Y P A C K A G E
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-compatibility-server</artifactId>
<version>8.0.0</version>
</dependency>
D R O P C O M P AT I B I L I T Y P A C K A G E
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
<version>8.0.0</version>
</dependency>
W H AT ' S N E X T ?
V A A D I N
G R I D 2 . 0
<vaadin-grid items="[[users.result]]">
<vaadin-grid-column width="50px" flex-grow="0">
<template class="header">#</template>
<template>[[index]]</template>
<template class="footer">#</template>
</vaadin-grid-column>
<vaadin-grid-column>
<template class="header">First Name</template>
<template>[[item.firstName]]</template>
<template class="footer">First Name</template>
</vaadin-grid-column>
<vaadin-grid-column>
<template class="header">Last Name</template>
<template>[[item.lastName]]</template>
<template class="footer">Last Name</template>
</vaadin-grid-column>
</vaadin-grid>
I thought you said there would
be no HTML
– Every single Vaadin developer
”
L E T ' S TA K E A T R I P B A C K I N T I M E
•
•
User
Interface
Automata
.1
2001
Button button = new Button("Hello");
TextField text = new TextField();
SERVER APP
Button button = new Button("Hello");
TextField text = new TextField();
SERVER APP
.1
2001
Button button = new Button("Hello");
TextField text = new TextField();
SERVER APP
WSDL transform
Button button = new Button("Hello");
TextField text = new TextField();
SERVER APP
joonas.lehtinen@itmill.com +358 40 5035001 www.itmill.com
Web Adapter
.1
2001
3
2002
Button button = new Button("Hello");
TextField text = new TextField();
SERVER APP (Millstone)
Web Adapter
joonas.lehtinen@itmill.com +358 40 5035001 www.itmill.com
AJAXAdapter
.1
2001
3
2002
4
2007
Button button = new Button("Hello");
TextField text = new TextField();
SERVER APP (IT Mill Toolkit)
AJAX Adapter
.1
2001
3
2002
4
2007
5
2007
Button button = new Button("Hello");
TextField text = new TextField();
SERVER APP (IT Mill Toolkit)
Web Adapter (GWT)
.1
2001
3
2002
4
2007
5
2007
6
2009
7
2013
8
2017
Button button = new Button("Hello");
TextField text = new TextField();
SERVER APP (Vaadin)
GWT
.1
2001
3
2002
4
2007
5
2007
6
2009
7
2013
Button button = new Button("Hello");
TextField text = new TextField();
SERVER APP (Vaadin)
GWT
.1
2001
3
2002
4
2007
5
2007
6
2009
7
2013
Button button = new Button("Hello");
TextField text = new TextField();
SERVER APP (Vaadin)
GWT
8
2017
.1
2001
3
2002
4
2007
5
2007
6
2009
7
2013
Button button = new Button("Hello");
TextField text = new TextField();
SERVER APP
Web Components
8
2017
9
H T M L I M P O R T S I N V A A D I N 8
webapp/VAADIN$ bower install -save game-card
webapp/VAADIN$ bower install -save game-card
@JavaScript("GameCard.js")
@HtmlImport("vaadin://bower_components/game-card/game-card.html")
public class GameCard extends AbstractJavaScriptComponent {
public GameCard(String symbol, String rank) {
callFunction("setCard", symbol, rank);
}
}
com_example_GameCard = function () {
var element = this.getElement();
this.setCard = function (symbol, rank) {
element.set("symbol", symbol);
element.set("rank", rank);
};
};
com_example_GameCard.tag = "game-card";
V A A D I N . C O M / E L E M E N T S
T H A N K Y O U
@ M A R C U S H E L L B E R G # V A A D I N 8

Weitere ähnliche Inhalte

Was ist angesagt?

Vaadin Flow - JavaLand 2018
Vaadin Flow - JavaLand 2018Vaadin Flow - JavaLand 2018
Vaadin Flow - JavaLand 2018Peter Lehto
 
Vaadin DevDay 2017 - Web Components
Vaadin DevDay 2017 - Web ComponentsVaadin DevDay 2017 - Web Components
Vaadin DevDay 2017 - Web ComponentsPeter Lehto
 
Google Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocialGoogle Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocialPatrick Chanezon
 
GWT Training - Session 2/3
GWT Training - Session 2/3GWT Training - Session 2/3
GWT Training - Session 2/3Faiz Bashir
 
Django tutorial
Django tutorialDjango tutorial
Django tutorialKsd Che
 
GWT Training - Session 3/3
GWT Training - Session 3/3GWT Training - Session 3/3
GWT Training - Session 3/3Faiz Bashir
 
GWT Training - Session 1/3
GWT Training - Session 1/3GWT Training - Session 1/3
GWT Training - Session 1/3Faiz Bashir
 
Lessons Learned: Migrating Tests to Selenium v2
Lessons Learned: Migrating Tests to Selenium v2Lessons Learned: Migrating Tests to Selenium v2
Lessons Learned: Migrating Tests to Selenium v2rogerjhu1
 
4 coding101 fewd_lesson4_j_query_and_buttons 20210105
4 coding101 fewd_lesson4_j_query_and_buttons 202101054 coding101 fewd_lesson4_j_query_and_buttons 20210105
4 coding101 fewd_lesson4_j_query_and_buttons 20210105John Picasso
 
JSF Custom Components
JSF Custom ComponentsJSF Custom Components
JSF Custom ComponentsMichael Fons
 
What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0Michael Fons
 

Was ist angesagt? (14)

Vaadin Flow - JavaLand 2018
Vaadin Flow - JavaLand 2018Vaadin Flow - JavaLand 2018
Vaadin Flow - JavaLand 2018
 
Vaadin DevDay 2017 - Web Components
Vaadin DevDay 2017 - Web ComponentsVaadin DevDay 2017 - Web Components
Vaadin DevDay 2017 - Web Components
 
Android data binding
Android data bindingAndroid data binding
Android data binding
 
Data binding
Data bindingData binding
Data binding
 
Google Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocialGoogle Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocial
 
GWT Training - Session 2/3
GWT Training - Session 2/3GWT Training - Session 2/3
GWT Training - Session 2/3
 
Django tutorial
Django tutorialDjango tutorial
Django tutorial
 
GWT Training - Session 3/3
GWT Training - Session 3/3GWT Training - Session 3/3
GWT Training - Session 3/3
 
GWT Training - Session 1/3
GWT Training - Session 1/3GWT Training - Session 1/3
GWT Training - Session 1/3
 
Lessons Learned: Migrating Tests to Selenium v2
Lessons Learned: Migrating Tests to Selenium v2Lessons Learned: Migrating Tests to Selenium v2
Lessons Learned: Migrating Tests to Selenium v2
 
Android how to hellowidget
Android how to hellowidgetAndroid how to hellowidget
Android how to hellowidget
 
4 coding101 fewd_lesson4_j_query_and_buttons 20210105
4 coding101 fewd_lesson4_j_query_and_buttons 202101054 coding101 fewd_lesson4_j_query_and_buttons 20210105
4 coding101 fewd_lesson4_j_query_and_buttons 20210105
 
JSF Custom Components
JSF Custom ComponentsJSF Custom Components
JSF Custom Components
 
What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0
 

Ähnlich wie What's new in Vaadin 8, how do you upgrade, and what's next?

Building web apps with Vaadin 8
Building web apps with Vaadin 8 Building web apps with Vaadin 8
Building web apps with Vaadin 8 Marcus Hellberg
 
JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys
JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys
JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys PROIDEA
 
iOS 개발자의 Flutter 체험기
iOS 개발자의 Flutter 체험기iOS 개발자의 Flutter 체험기
iOS 개발자의 Flutter 체험기Wanbok Choi
 
Adventures on live partitioning
Adventures on live partitioningAdventures on live partitioning
Adventures on live partitioningMatteo Melli
 
Introduction To Google Android (Ft Rohan Bomle)
Introduction To Google Android (Ft Rohan Bomle)Introduction To Google Android (Ft Rohan Bomle)
Introduction To Google Android (Ft Rohan Bomle)Fafadia Tech
 
Refactoring Wunderlist. UA Mobile 2016.
Refactoring Wunderlist. UA Mobile 2016.Refactoring Wunderlist. UA Mobile 2016.
Refactoring Wunderlist. UA Mobile 2016.UA Mobile
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best PracticesYekmer Simsek
 
From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)Jose Manuel Pereira Garcia
 
Jaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebJaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebPatrick Chanezon
 
Automate iOS Deployment with Hamper and Schezhen
Automate iOS Deployment with Hamper and SchezhenAutomate iOS Deployment with Hamper and Schezhen
Automate iOS Deployment with Hamper and SchezhenKiran Panesar
 
Serverless Functions and Vue.js
Serverless Functions and Vue.jsServerless Functions and Vue.js
Serverless Functions and Vue.jsSarah Drasner
 
Google Assistant po polsku - developerski punkt widzenia
Google Assistant po polsku - developerski punkt widzeniaGoogle Assistant po polsku - developerski punkt widzenia
Google Assistant po polsku - developerski punkt widzeniaArtur Skowroński
 
Vaadin 7 by Joonas Lehtinen
Vaadin 7 by Joonas LehtinenVaadin 7 by Joonas Lehtinen
Vaadin 7 by Joonas LehtinenCodemotion
 
Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?Gábor Hojtsy
 

Ähnlich wie What's new in Vaadin 8, how do you upgrade, and what's next? (20)

Building web apps with Vaadin 8
Building web apps with Vaadin 8 Building web apps with Vaadin 8
Building web apps with Vaadin 8
 
Vaadin 8 and 10
Vaadin 8 and 10Vaadin 8 and 10
Vaadin 8 and 10
 
JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys
JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys
JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys
 
GraphQL, l'avenir du REST ?
GraphQL, l'avenir du REST ?GraphQL, l'avenir du REST ?
GraphQL, l'avenir du REST ?
 
iOS 개발자의 Flutter 체험기
iOS 개발자의 Flutter 체험기iOS 개발자의 Flutter 체험기
iOS 개발자의 Flutter 체험기
 
Adventures on live partitioning
Adventures on live partitioningAdventures on live partitioning
Adventures on live partitioning
 
Introduction To Google Android (Ft Rohan Bomle)
Introduction To Google Android (Ft Rohan Bomle)Introduction To Google Android (Ft Rohan Bomle)
Introduction To Google Android (Ft Rohan Bomle)
 
Refactoring Wunderlist. UA Mobile 2016.
Refactoring Wunderlist. UA Mobile 2016.Refactoring Wunderlist. UA Mobile 2016.
Refactoring Wunderlist. UA Mobile 2016.
 
Android Development on Fire TV
Android Development on Fire TVAndroid Development on Fire TV
Android Development on Fire TV
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
 
From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)
 
Minicurso Android
Minicurso AndroidMinicurso Android
Minicurso Android
 
Jaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social WebJaoo - Open Social A Standard For The Social Web
Jaoo - Open Social A Standard For The Social Web
 
Automate iOS Deployment with Hamper and Schezhen
Automate iOS Deployment with Hamper and SchezhenAutomate iOS Deployment with Hamper and Schezhen
Automate iOS Deployment with Hamper and Schezhen
 
Vaadin 7
Vaadin 7Vaadin 7
Vaadin 7
 
Serverless Functions and Vue.js
Serverless Functions and Vue.jsServerless Functions and Vue.js
Serverless Functions and Vue.js
 
Google Assistant po polsku - developerski punkt widzenia
Google Assistant po polsku - developerski punkt widzeniaGoogle Assistant po polsku - developerski punkt widzenia
Google Assistant po polsku - developerski punkt widzenia
 
Vaadin7
Vaadin7Vaadin7
Vaadin7
 
Vaadin 7 by Joonas Lehtinen
Vaadin 7 by Joonas LehtinenVaadin 7 by Joonas Lehtinen
Vaadin 7 by Joonas Lehtinen
 
Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?
 

Mehr von Marcus Hellberg

Building performant web apps
Building performant web appsBuilding performant web apps
Building performant web appsMarcus Hellberg
 
Building web apps with vaadin 10
Building web apps with vaadin 10Building web apps with vaadin 10
Building web apps with vaadin 10Marcus Hellberg
 
Going web native - Feb 2018
Going web native - Feb 2018Going web native - Feb 2018
Going web native - Feb 2018Marcus Hellberg
 
Demystifying progressive web apps
Demystifying progressive web appsDemystifying progressive web apps
Demystifying progressive web appsMarcus Hellberg
 
Progressive web apps with polymer
Progressive web apps with polymerProgressive web apps with polymer
Progressive web apps with polymerMarcus Hellberg
 

Mehr von Marcus Hellberg (8)

Building performant web apps
Building performant web appsBuilding performant web apps
Building performant web apps
 
Building web apps with vaadin 10
Building web apps with vaadin 10Building web apps with vaadin 10
Building web apps with vaadin 10
 
Going web native - Feb 2018
Going web native - Feb 2018Going web native - Feb 2018
Going web native - Feb 2018
 
Demystifying progressive web apps
Demystifying progressive web appsDemystifying progressive web apps
Demystifying progressive web apps
 
Progressive web apps with polymer
Progressive web apps with polymerProgressive web apps with polymer
Progressive web apps with polymer
 
Booting up with polymer
Booting up with polymerBooting up with polymer
Booting up with polymer
 
Booting up with polymer
Booting up with polymerBooting up with polymer
Booting up with polymer
 
Vaadin NYC Meetup
Vaadin NYC MeetupVaadin NYC Meetup
Vaadin NYC Meetup
 

Kürzlich hochgeladen

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 

Kürzlich hochgeladen (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 

What's new in Vaadin 8, how do you upgrade, and what's next?

  • 1. V A A D I N 8 A N D B E Y O N D 5 S T O R Y A N D P H I L O S O P H Y Software is eating the world and what most of us see of it is the user interface. The user interface has become the key component of how the users experience the business behind it. Competition is lost or won due to user experience. Simplicity is king and the users get frustrated by anything ugly, slow or not working on the device they happen to use at the time. We at Vaadin fight for simplicity and invite everyone to join this fight. Together we want to build a user interface that puts a smile on the user’s face. Vaadin is the technology that empowers developers to build the best web-apps for business purposes. Our priority over everything else is developer productivity because we believe that by simplifying the developer experience and saving the developer’s time, they are best able to focus on building great user interfaces. Our brand is what we want everyone to think about us. When everyone - both us and the people around us - have a consistent understanding of what Vaadin is and what we stand for, it enables that image to spread and amplify. This book defines what we want that image to be. It defines what the Vaadin brand is. I hope that You are as excited and proud of living and breathing the Vaadin brand as I am. You are the one who is shaping what everyone thinks about Vaadin - using this brand as a tool and a guideline every day. Let’s fight for simplicity for both the users and the developers! Joonas Lehtinen Founder & CEO Vaadin I N T R O D U C T I O N @ M A R C U S H E L L B E R G # V A A D I N 8
  • 2. things we'll look at 1. What's new in Vaadin 8 2. How you upgrade to Vaadin 8 3. What's next for Vaadin
  • 3. W H AT ' S N E W ?
  • 4. B R E A K I N G C H A N G E S
  • 5. B R E A K I N G C H A N G E S Only Java 8 + supported
  • 6. B R E A K I N G C H A N G E S Only Java 8 + supported Dropped support for IE 8, 9, and 10
  • 7. B R E A K I N G C H A N G E S Only Java 8 + supported Dropped support for IE 8, 9, and 10 Requires Servlet 3.0+ Container
  • 8. B R E A K I N G C H A N G E S Only Java 8 + supported Dropped support for IE 8, 9, and 10 Requires Servlet 3.0+ Container All themes except Valo are dropped
  • 9.
  • 10. R . I . P . C O N TA I N E R , I T E M & P R O P E R T Y
  • 11. B I N D I N G T O A C O L L E C T I O N BeanItemContainer<Person> container = new BeanItemContainer(Person.class, persons); Grid grid = new Grid(); grid.setContainerDataSource(container); List<Person> persons = Backend.getPersons();
  • 12. B I N D I N G T O A C O L L E C T I O N List<Person> persons = Backend.getPersons(); Grid<Person> grid = new Grid<>(Person.class); grid.setItems(persons);
  • 13. 1 0 X L E S S M E M O R Y U S A G E
  • 14. 1 0 X L E S S M E M O R Y U S A G E ( ! )
  • 15. 1 0 X L E S S M E M O R Y U S A G E ( ! ) S I G N I F I C A N T L Y L O W E R C P U U S A G E
  • 16. D E F I N I N G C O L U M N S Grid grid = new Grid(); grid.setContainerDataSource(new BeanItemContainer<>(persons)); grid.removeAllColumns(); grid.addColumn("firstName"); grid.getColumn("firstName").setHeaderCaption("First Name"); grid.addColumn("lastName"); List<Person> persons = Backend.getPersons();
  • 17. D E F I N I N G C O L U M N S Grid<Person> grid = new Grid<>(); grid.setItems(persons); grid.addColumn(Person::getFirstName).setCaption("First Name"); grid.addColumn(Person::getLastName).setCaption("Last Name"); List<Person> persons = Backend.getPersons();
  • 18. L A Z Y L O A D I N G
  • 19. L A Z Y L O A D I N G grid.setDataProvider( (sortOrder, offset, limit) -> service.findAll(offset, limit), () -> service.count() );
  • 20. C U S T O M C A P T I O N S List<Person> persons = Backend.getPersons(); ComboBox comboBox = new ComboBox(); BeanItemContainer<Person> bic = new BeanItemContainer<>(persons); GeneratedPropertyContainer gpc = new GeneratedPropertyContainer(bic); gpc.addGeneratedProperty("name", new PropertyValueGenerator<String>() { @Override public String getValue( Item i, Object id, Object o1) { Person p = (Person) id; return p.getFirstName() + " " + p.getLastName(); }
  • 21. C U S T O M C A P T I O N S String fullname = genItem.getItemProperty("name") .getValue().toString(); return fullname.toLowerCase().startsWith( ssf.getFilterString()); } @Override public boolean appliesToProperty( Object propertyId) { return "name".equals(propertyId); } } } }); comboBox.setItemCaptionPropertyId("name"); comboBox.setContainerDataSource(gpc);
  • 22. C U S T O M C A P T I O N S List<Person> persons = Backend.getPersons(); ComboBox<Person> comboBox = new ComboBox<>(); comboBox.setItemCaptionGenerator( p -> p.getFirstName() + " " + p.getLastName() ); comboBox.setItems(persons);
  • 23. T Y P E S A F E E V E N T S comboBox.addValueChangeListener(evt -> { Person p = (Person) evt.getProperty().getValue(); assert(p.getName().equals("John")); });
  • 24. T Y P E S A F E E V E N T S comboBox.addValueChangeListener(evt -> { assert(evt.getValue().getName().equals("John")); });
  • 25. N U L L R E P R E S E N TAT I O N
  • 26. B I N D I N G T O F I E L D S class PatientFormLayout extends FormLayout { TextField firstName; TextField middleName; TextField lastName; } PatientFormLayout form = new PatientFormLayout(); Binder<Patient> binder = new Binder<>(Patient.class); binder.bindInstanceFields(formLayout);
  • 27. B I N D I N G T O F I E L D S class PatientFormLayout extends FormLayout { TextField firstName; TextField middleName; TextField lastName; Binder<Patient> binder = new Binder<>(Patient.class); binder.forField(firstName) .withValidator(str -> str.length() > 4, "Name too short") .bind("firstName"); }
  • 28. E A G E R V A L I D AT I O N
  • 29. E A G E R V A L I D AT I O N
  • 30. N E W L A Y O U T D E F A U L T S
  • 31. N E W L A Y O U T D E F A U L T S
  • 32. A U T O M AT I C E X P A N D HorizontalLayout header = new HorizontalLayout(title, logout); VerticalLayout root = new VerticalLayout(header, grid); grid.setSizeFull(); root.setExpandRatio(grid, 1); root.setSizeFull();
  • 33. A U T O M AT I C E X P A N D HorizontalLayout header = new HorizontalLayout(title, logout); VerticalLayout root = new VerticalLayout(header); root.addComponentsAndExpand(grid);
  • 34. V A A D I N 8 . 1 I M P R O V E M E N T S
  • 35. T R E E G R I D
  • 36. T R E E G R I D
  • 37. C O M P O N E N T S I N G R I D
  • 38. C O M P O N E N T S I N G R I D
  • 39. H T M L 5 D R A G A N D D R O P
  • 40. H T M L 5 D R A G A N D D R O P
  • 41. T O U C H K I T I S N O W O P E N S O U R C E
  • 42.
  • 43. V A A D I N 6 E N D O F L I F E
  • 44. 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 9 6 3 7 8 Fo r wards Comp atib le GUARANTEED SUPPORT ≥ 5 years for a major release ≥ 2 latest major releases (after that support is available on time and materials basis) ? 5 4 guaranteed guaranteed guaranteed guaranteed migration path migration path
  • 45. M A K I N G T H E J U M P T O 8
  • 46. T W O U P G R A D E P AT H S vaadin-server 7.x
  • 47. T W O U P G R A D E P AT H S vaadin-server 7.x
  • 48. T W O U P G R A D E P AT H S vaadin-server 7.x vaadin-server 8.x
  • 49. T W O U P G R A D E P AT H S vaadin-server 7.x vaadin-compatibility-server 8.x vaadin-server 8.x
  • 50. T W O U P G R A D E P AT H S vaadin-server 7.x vaadin-compatibility-server 8.x vaadin-server 8.x
  • 51. U P D AT E P A C K A G E <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-server</artifactId> <version>7.7.6</version> </dependency>
  • 52. U P D AT E P A C K A G E <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-compatibility-server</artifactId> <version>8.0.0</version> </dependency>
  • 53. C O M P AT I B I L I T Y S E R V E R
  • 54. C O M P AT I B I L I T Y S E R V E R
  • 55. U P D AT E F O R M S Change FieldGroups to Binders Move validators from Fields to Binder Update Converters to new interface
  • 56. R E M O V E C O N TA I N E R S Change BeanItem/IndexedContainers to setItems Lazy containers should instead use dataProvider
  • 57. D R O P C O M P AT I B I L I T Y P A C K A G E <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-compatibility-server</artifactId> <version>8.0.0</version> </dependency>
  • 58. D R O P C O M P AT I B I L I T Y P A C K A G E <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-server</artifactId> <version>8.0.0</version> </dependency>
  • 59. W H AT ' S N E X T ?
  • 60. V A A D I N G R I D 2 . 0
  • 61. <vaadin-grid items="[[users.result]]"> <vaadin-grid-column width="50px" flex-grow="0"> <template class="header">#</template> <template>[[index]]</template> <template class="footer">#</template> </vaadin-grid-column> <vaadin-grid-column> <template class="header">First Name</template> <template>[[item.firstName]]</template> <template class="footer">First Name</template> </vaadin-grid-column> <vaadin-grid-column> <template class="header">Last Name</template> <template>[[item.lastName]]</template> <template class="footer">Last Name</template> </vaadin-grid-column> </vaadin-grid>
  • 62. I thought you said there would be no HTML – Every single Vaadin developer ”
  • 63. L E T ' S TA K E A T R I P B A C K I N T I M E
  • 64.
  • 65.
  • 67.
  • 68.
  • 69. .1 2001 Button button = new Button("Hello"); TextField text = new TextField(); SERVER APP Button button = new Button("Hello"); TextField text = new TextField(); SERVER APP
  • 70. .1 2001 Button button = new Button("Hello"); TextField text = new TextField(); SERVER APP WSDL transform Button button = new Button("Hello"); TextField text = new TextField(); SERVER APP
  • 71.
  • 72. joonas.lehtinen@itmill.com +358 40 5035001 www.itmill.com Web Adapter
  • 73. .1 2001 3 2002 Button button = new Button("Hello"); TextField text = new TextField(); SERVER APP (Millstone) Web Adapter
  • 74.
  • 75. joonas.lehtinen@itmill.com +358 40 5035001 www.itmill.com AJAXAdapter
  • 76. .1 2001 3 2002 4 2007 Button button = new Button("Hello"); TextField text = new TextField(); SERVER APP (IT Mill Toolkit) AJAX Adapter
  • 77.
  • 78. .1 2001 3 2002 4 2007 5 2007 Button button = new Button("Hello"); TextField text = new TextField(); SERVER APP (IT Mill Toolkit) Web Adapter (GWT)
  • 79.
  • 80.
  • 81. .1 2001 3 2002 4 2007 5 2007 6 2009 7 2013 8 2017 Button button = new Button("Hello"); TextField text = new TextField(); SERVER APP (Vaadin) GWT
  • 82. .1 2001 3 2002 4 2007 5 2007 6 2009 7 2013 Button button = new Button("Hello"); TextField text = new TextField(); SERVER APP (Vaadin) GWT
  • 83. .1 2001 3 2002 4 2007 5 2007 6 2009 7 2013 Button button = new Button("Hello"); TextField text = new TextField(); SERVER APP (Vaadin) GWT 8 2017
  • 84. .1 2001 3 2002 4 2007 5 2007 6 2009 7 2013 Button button = new Button("Hello"); TextField text = new TextField(); SERVER APP Web Components 8 2017 9
  • 85. H T M L I M P O R T S I N V A A D I N 8
  • 86. webapp/VAADIN$ bower install -save game-card
  • 87. webapp/VAADIN$ bower install -save game-card @JavaScript("GameCard.js") @HtmlImport("vaadin://bower_components/game-card/game-card.html") public class GameCard extends AbstractJavaScriptComponent { public GameCard(String symbol, String rank) { callFunction("setCard", symbol, rank); } }
  • 88. com_example_GameCard = function () { var element = this.getElement(); this.setCard = function (symbol, rank) { element.set("symbol", symbol); element.set("rank", rank); }; }; com_example_GameCard.tag = "game-card";
  • 89.
  • 90.
  • 91. V A A D I N . C O M / E L E M E N T S
  • 92. T H A N K Y O U @ M A R C U S H E L L B E R G # V A A D I N 8