16. s
3
3.5 Browsers to support in 2012
yo
ur
ap
Desktop
3.5 Browsers to support in 2012
browsers
pp
p
su
lic
pp
at
r 9 io n
or
t?
8% U
I fo
ov of
er ap r
th take ps
e
nu n
ro
pe mb
er
.
36
.1%
6/7
IE 6/7
6/7
Opera
Safari
14%
IE 6/7
14%
Ta
bl
et
s
18%
9
10
36%
36%
18%
Safari
IE 9
79%
79%
9
98.1%
IE 10
80%
80%
10
2.
O
Opera
th
er
Chrome
s
1%
94%
iP
ad
94%
An
3
W dr6
in o.1
do id%
“S
w What kind of devices does yourh app support?
in ince
ex t e gw
s
po plai ent t is
8
ph pul n w erp us
e
r
a
h
IE 9
IE 10
Browsers developers expect to support in 2013
Browsers developers expect to support in 2013
on r
is
d
es tha y ta e, t ex
”
n ble his ten
su ts
m si
Chrome
in
8
54%
54%
IE 8
Firefox
Ph
on
es
94% iPh
A
94%nd one
2
Firefox
inc
e
ex the gw
po plain ente
ph pula wh rp
on r t y t
es ha ab
n
”
su
pp
8
IE 8
“S
W 5 ro
P .7 id
8%
Da
ni
el
31. Web application layers
JS
GWT Vaadin
Backend
server
Web
server
Communication
Java to
JavaScript
JavaScript
required
required
optional
optional
optional
required
required
required
required
optional
required
required
required
required
32. Web application layers
JS
GWT Vaadin
Backend
server
Web
server
Communication
Java to
JavaScript
JavaScript
required
required
optional
optional
optional
required
required
1 layer
required
vs
required
3 layers
-50% codelines
-50% development
required
required
-50% maintenance
easier to learn
required
required
optional
53. 934 tickets closed during 16 months of
development
Oldest ticket created 3/2008
Newest ticket 2/2013
3939 commits made by 23 authors
93 % by 6 persons
> 1 000 000 lines of code touched
82. public class Employee {
String firstName;
String lastName;
double salary;
Date birthDate;
// Getters, setters, …
}
!
Form form = new Form();
form.setItemDataSource(
new BeanItem<Employee>(employee));
6
83.
84.
85. form.setFormFieldFactory(new FormFieldFactory() {
!
public Field createField(Item item, Object propertyId,
Component uiContext) {
!
6
if ("birthDate".equals(propertyId)) {
DateField df = new DateField();
df.setResolution(DateField.RESOLUTION_DAY);
return df;
}
!
// ..
!
return DefaultFieldFactory.createFieldByPropertyType(item
.getItemProperty(propertyId).getType());
}
});
86. GridLayout form = new GridLayout(2,2) {
TextField
TextField
TextField
DateField
{
}
};
firstName = new TextField("First name");
lastName = new TextField("Last name");
salary = new TextField("Salary");
birthDate = new DateField("Birth date");
7
birthDate.setResolution(Resolution.DAY);
setSpacing(true);
addComponent(firstName);
addComponent(lastName);
addComponent(birthDate);
addComponent(salary);
BeanFieldGroup<Employee> fieldGroup = new BeanFieldGroup<Employee>(Employee.class);
fieldGroup.bindMemberFields(form);
fieldGroup.setItemDataSource(new BeanItem<Employee>(employee));
87. public class Person {
!
@Size(min = 5, max = 50)
private String name;
!
@Min(0)
@Max(100)
private int age;
!
// + constructor + setters + getters
}