Transcript
Page 1: Vaadin today and tomorrow

Vaadin7today and tomorrow

@joonaslehtinenVaadin, Founder

Page 2: Vaadin today and tomorrow

v3

2002

v0.1

2001

OpenSource

Page 3: Vaadin today and tomorrow

v4

2006

Ajax

v5

2007

Page 4: Vaadin today and tomorrow

v6

2009 7

Page 5: Vaadin today and tomorrow
Page 6: Vaadin today and tomorrow

934 tickets closed during 16 months of development

3939 commits made by 23 authors

Oldest ticket created 3/2008Newest ticket 2/2013

3939 commits made by 23 authors93 % by 6 persons

> 1 000 000 lines of code touched

Page 13: Vaadin today and tomorrow

Completestack

Renewedfrom Inside

Sass

JS

HTML5

+=GWT

RPCState

UI

Field

Page 14: Vaadin today and tomorrow
Page 15: Vaadin today and tomorrow
Page 16: Vaadin today and tomorrow
Page 17: Vaadin today and tomorrow
Page 18: Vaadin today and tomorrow
Page 19: Vaadin today and tomorrow
Page 20: Vaadin today and tomorrow
Page 21: Vaadin today and tomorrow
Page 22: Vaadin today and tomorrow
Page 23: Vaadin today and tomorrow
Page 24: Vaadin today and tomorrow

Favorite picks7

Page 25: Vaadin today and tomorrow

Vaadin += GWT

Page 26: Vaadin today and tomorrow
Page 27: Vaadin today and tomorrow
Page 28: Vaadin today and tomorrow
Page 29: Vaadin today and tomorrow

GWTCompatible

Page 30: Vaadin today and tomorrow

Server-

Client-

side

Optim

ized fo

r

Prod

uctivity

Optim

ized for

Con

trol

Page 31: Vaadin today and tomorrow

Architecture

Page 32: Vaadin today and tomorrow
Page 33: Vaadin today and tomorrow
Page 34: Vaadin today and tomorrow
Page 35: Vaadin today and tomorrow
Page 36: Vaadin today and tomorrow
Page 37: Vaadin today and tomorrow
Page 38: Vaadin today and tomorrow
Page 39: Vaadin today and tomorrow

New Windowing API

Page 40: Vaadin today and tomorrow
Page 41: Vaadin today and tomorrow

public class Vaadin6App extends Application {

public void init() { setMainWindow(createWindow()); }

public Window getWindow(String name) { Window window = super.getWindow(name); if (window == null) { window = createWindow(); window.setName(name); addWindow(window); } return window; }

private Window createWindow() { Window window = new Window("Vaadin 6 Application"); window.addComponent(new TextField("What is your name")); window.addComponent(new Button("Do not push me")); return window; }

}

Page 42: Vaadin today and tomorrow

@Title("Vaadin 7 Application")public class Vaadin7uiUI extends UI {

public void init(VaadinRequest request) { addComponent(new TextField("What is your name")); addComponent(new Button("Do not push me")); }

}

Page 43: Vaadin today and tomorrow

Built-in high level

View management

Page 44: Vaadin today and tomorrow

Sass

Page 47: Vaadin today and tomorrow

RedesignedForms

Page 48: Vaadin today and tomorrow

public class Employee { String firstName; String lastName; double salary; Date birthDate; // Getters, setters, …}

Form form = new Form();form.setItemDataSource( new BeanItem<Employee>(employee));

6

Page 49: Vaadin today and tomorrow
Page 50: Vaadin today and tomorrow
Page 51: Vaadin today and tomorrow

form.setFormFieldFactory(new FormFieldFactory() {

public Field createField(Item item, Object propertyId, Component uiContext) {

if ("birthDate".equals(propertyId)) { DateField df = new DateField(); df.setResolution(DateField.RESOLUTION_DAY); return df; }

// ..

return DefaultFieldFactory.createFieldByPropertyType(item .getItemProperty(propertyId).getType()); } });

6

Page 52: Vaadin today and tomorrow

GridLayout form = new GridLayout(2,2) {

TextField firstName = new TextField("First name"); TextField lastName = new TextField("Last name"); TextField salary = new TextField("Salary"); DateField birthDate = new DateField("Birth date");

{ 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));

7

Page 53: Vaadin today and tomorrow

public class Person {

@Size(min = 5, max = 50) private String name;

@Min(0) @Max(100) private int age;

// + constructor + setters + getters}

Page 54: Vaadin today and tomorrow

model

presentation

“Joonas Lehtinen”

Component

firstName = “Joonas”lastName = “Lehtinen”Demo

Page 55: Vaadin today and tomorrow

RPCState

Page 56: Vaadin today and tomorrow

Component

Widget

Paintable

server

clientVariable

Changes

UIDL

6

Page 58: Vaadin today and tomorrow

public interface ButtonRpc extends ServerRpc { public void click(MouseEventDetails details);}

private ButtonRpc rpc = RpcProxy.create(ButtonRpc.class, this);

public void onClick(ClickEvent event) { rpc.click( new MouseEventDetails(event));}

serverclient

private ButtonRpc rpc = new ButtonRpc() { public void click( MouseEventDetails details) { // do stuff }};

public Button() { registerRpc(rpc);}

Page 59: Vaadin today and tomorrow

JavaScriptAdd-ons

Page 60: Vaadin today and tomorrow

getPage().getJavaScript().addCallback("myCallback", new JavaScriptCallback() { public void call(JSONArray arguments) throws JSONException { // Do something with the arguments } });

Publish API from Java

window.myCallback('foo', 100);

Use from JavaScript

Page 61: Vaadin today and tomorrow

window.com_example_MyWidget = function() { var element = $(this.getWidgetElement());

// Draw a plot for any server-side (plot data) state change this.onStateChange = function() { $.plot(element, this.getState().series, {grid: {clickable: true}}); }

// Communicate local events back to server-side component element.bind('plotclick', function(event, point, item) { if (item) {

var onPlotClick = this.getCallback("plotClick"); onPlotClick(item.seriesIndex, item.dataIndex); } });}

Widget implementation in JavaScript

Page 62: Vaadin today and tomorrow

public class MyWidget extends AbstractJavaScriptComponent {

public MyWidget() { registerCallback("plotClick", new JavaScriptCallback() { public void call(JSONArray arguments) throws JSONException { // Do something with the event } }); }

public static class MyWidgetState extends ComponentState { public List<List<List<Double>>> plotSeriesData = new ArrayList<List<List<Double>>>(); // getters & setters }

}

Server-side Java API for Widget

Page 63: Vaadin today and tomorrow

HTML5

Page 64: Vaadin today and tomorrow

<!DOCTYPE html>

Page 65: Vaadin today and tomorrow

PerformanceNo or minimal layout calculations

Layout responsibility moved to browser

Lighter DOM Minimized reflows

6.8

7.0

Page 66: Vaadin today and tomorrow
Page 67: Vaadin today and tomorrow
Page 68: Vaadin today and tomorrow

IE8 (norm)

Page 69: Vaadin today and tomorrow
Page 70: Vaadin today and tomorrow

Roadmap

Page 71: Vaadin today and tomorrow

Vaadin Framework 7.1

• Server push• Based on Atmosphere Framework• Web sockets, long polling and polling

• Calendar (now under Apache 2.0 license)• Limited IE 10 support without touch• CSS string inject• Renewed debug console features

◦Redesigned UI/UX for debug window

◦Optimize widgetset• Arithmetics for SASS• Packaging CSS for add-ons without a widgetset

Page 72: Vaadin today and tomorrow
Page 73: Vaadin today and tomorrow

Vaadin Charts

• 1.1 version to be released in May, 2013• New charts:

• Funnel• Box plot• Waterfall• Bubble• Error bars

• Different coloring of a graph above and below a threshold• Pinch zooming and panning for touch devices

Page 74: Vaadin today and tomorrow
Page 75: Vaadin today and tomorrow
Page 76: Vaadin today and tomorrow
Page 77: Vaadin today and tomorrow
Page 78: Vaadin today and tomorrow
Page 79: Vaadin today and tomorrow
Page 80: Vaadin today and tomorrow
Page 81: Vaadin today and tomorrow

Vaadin TouchKit

• 3.0 version to be released in April• Vaadin 7 support• New components:

• URLField• Datefield• Combobox

• Preparing WP8 support

Page 82: Vaadin today and tomorrow

Vaadin TestBench

• 3.1 adds headless modein May

Page 83: Vaadin today and tomorrow

Vaadin CDI

• Alpha to be released in the end of March • Apache 2.0 License

Page 84: Vaadin today and tomorrow

Vaadin JPAContainer

• License changed to Apache 2.0• Vaadin 7 compatible version released in March

Page 85: Vaadin today and tomorrow

? [email protected] vaadin.com/joonas

@joonaslehtinen


Top Related