The document discusses building modern web apps in Java using Vaadin 10. It provides an agenda that includes a quick intro to Vaadin 10 and hands-on programming. It then covers Vaadin 10's focus on productivity and great UX through great DX. The core concepts of Vaadin are also summarized, including standard-based web components and the Java API.
14. new Span("I'm a <span>")
new Button("I'm a button")
new DatePicker("Select a date")
new ComboBox <>("Select an option")
15. new VerticalLayout(
new Button("I'm a button"),
new DatePicker("Select a date"),
new ComboBox <>("Select an option"),
new Span("I'm a <span>")
);
16. var nameField = new TextField("Name");
var button = new Button("Click me");
button.addClickListener(click -> {
add(new Span(nameField.getValue()));
});
17. var nameField = new TextField("Name");
var button = new Button("Click me");
button.addClickListener(click -> {
add(new Span(nameField.getValue()));
});
19. // Parent layout for all views under /users
@RoutePrefix("users")
class UsersView extends Div
implements RouterLayout {
// ... implementation ...
}
// matches /users/edit/123
@Route(value = "edit", layout = UsersView.class)
class UserEditorView extends Div
implements HasUrlParameter<Integer> {
@Override
public void setParameter(BeforeEvent event,
Integer userId) {
// ... fetch user ...
}
}
20. public class SignupForm extends VerticalLayout {
static class Person {
@NotEmpty private String name;
@Email @NotEmpty private String email;
}
private TextField name = new TextField("Name");
private TextField email = new TextField("Email");
private Person person = new Person();
public SignupForm() {
Binder<Person> binder
= new BeanValidationBinder <>(Person.class);
binder.bindInstanceFields(this);
binder.setBean(person);
Button save = new Button("Save");
add(name, email, save);
}
}
21. public class SignupForm extends VerticalLayout {
static class Person {
@NotEmpty private String name;
@Email @NotEmpty private String email;
}
private TextField name = new TextField("Name");
private TextField email = new TextField("Email");
private Person person = new Person();
public SignupForm() {
Binder<Person> binder
= new BeanValidationBinder <>(Person.class);
binder.bindInstanceFields(this);
binder.setBean(person);
Button save = new Button("Save");
add(name, email, save);
}
}
22. public Demo(PersonService service) {
Grid<Person> grid = new Grid <>();
grid.setItems(service.getPeople());
grid.addColumn(Person ::getName)
.setHeader("Name");
grid.addColumn(Person ::getAge)
.setHeader("Age");
}
23. public Demo(PersonService service) {
Grid<Person> grid = new Grid <>();
grid.setItems(service.getPeople());
grid.addColumn(Person ::getName)
.setHeader("Name");
grid.addColumn(Person ::getAge)
.setHeader("Age");
}
53. 2 0 1 8 2 0 2 12 0 1 9 2 0 2 0 2 0 2 2 2 0 2 52 0 2 3 2 0 2 4 • • •2 0 2 6 2 0 2 7
LT S- V10
LTS-V23
LT S-V3 1
LT S-V3 9
V1 2
V1 1
V1 3
V14
LTS-V17
V15
V16
+ 5 year support (bug fixes)
F A S T R E L E A S E C Y C L E + S T A B I L I T Y
54. R O A D M A P
- Better Progressive Web App support
- More components
- More starters