vaadin 7 today and tomorrow

78
Vaadin 7 today and tomorrow @joonaslehtinen

Upload: joonas-lehtinen

Post on 11-Nov-2014

3.314 views

Category:

Documents


3 download

DESCRIPTION

Vaadin Meetup Helsinki presentation in 2013/2 about the Vaadin 7 release and roadmap ahead.

TRANSCRIPT

Page 1: Vaadin 7 Today and Tomorrow

Vaadin7today and tomorrow

@joonaslehtinen

Page 2: Vaadin 7 Today and Tomorrow

v32002

v0.12001

OpenSource

Page 3: Vaadin 7 Today and Tomorrow

v42006

Ajax

v52007

Page 4: Vaadin 7 Today and Tomorrow

v62009 7

Page 5: Vaadin 7 Today and Tomorrow
Page 6: Vaadin 7 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 9: Vaadin 7 Today and Tomorrow

Completestack

Renewedfrom Inside

Sass

JS

HTML5+=GWT

RPCState

UI

Field

Page 10: Vaadin 7 Today and Tomorrow
Page 11: Vaadin 7 Today and Tomorrow
Page 12: Vaadin 7 Today and Tomorrow
Page 13: Vaadin 7 Today and Tomorrow
Page 14: Vaadin 7 Today and Tomorrow
Page 15: Vaadin 7 Today and Tomorrow
Page 16: Vaadin 7 Today and Tomorrow
Page 17: Vaadin 7 Today and Tomorrow
Page 18: Vaadin 7 Today and Tomorrow
Page 19: Vaadin 7 Today and Tomorrow
Page 20: Vaadin 7 Today and Tomorrow

Favorite picks7

Page 21: Vaadin 7 Today and Tomorrow

Vaadin += GWT

Page 22: Vaadin 7 Today and Tomorrow
Page 23: Vaadin 7 Today and Tomorrow
Page 24: Vaadin 7 Today and Tomorrow
Page 25: Vaadin 7 Today and Tomorrow

GWTCompatible

Page 26: Vaadin 7 Today and Tomorrow

Server-

Client-

side

Optim

ized for

Productivity

Opt

imiz

ed fo

r

Cont

rol

Page 27: Vaadin 7 Today and Tomorrow

Architecture

Page 28: Vaadin 7 Today and Tomorrow
Page 29: Vaadin 7 Today and Tomorrow

New Windowing API

Page 30: Vaadin 7 Today and Tomorrow
Page 31: Vaadin 7 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 32: Vaadin 7 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 33: Vaadin 7 Today and Tomorrow

Built-in high levelView management

Page 34: Vaadin 7 Today and Tomorrow

Sass

Page 37: Vaadin 7 Today and Tomorrow

RedesignedForms

Page 38: Vaadin 7 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 39: Vaadin 7 Today and Tomorrow
Page 40: Vaadin 7 Today and Tomorrow
Page 41: Vaadin 7 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 42: Vaadin 7 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 43: Vaadin 7 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 44: Vaadin 7 Today and Tomorrow

model

presentation

“Joonas Lehtinen”

Component

firstName = “Joonas”lastName = “Lehtinen”Demo

Page 45: Vaadin 7 Today and Tomorrow

RPCState

Page 46: Vaadin 7 Today and Tomorrow

Component

Widget

Paintable

server

clientVariable

Changes

UIDL

6

Page 48: Vaadin 7 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 49: Vaadin 7 Today and Tomorrow

JavaScriptAdd-ons

Page 50: Vaadin 7 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 51: Vaadin 7 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 52: Vaadin 7 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 53: Vaadin 7 Today and Tomorrow

HTML5

Page 54: Vaadin 7 Today and Tomorrow

<!DOCTYPE html>

Page 55: Vaadin 7 Today and Tomorrow

PerformanceNo or minimal layout calculations

Layout responsibility moved to browser

Lighter DOM Minimized reflows

6.8

7.0

Page 56: Vaadin 7 Today and Tomorrow
Page 57: Vaadin 7 Today and Tomorrow
Page 58: Vaadin 7 Today and Tomorrow
Page 59: Vaadin 7 Today and Tomorrow

Roadmap

Page 60: Vaadin 7 Today and Tomorrow

Feb - March - April

Page 61: Vaadin 7 Today and Tomorrow

Vaadin Framework 7.1

• Server push• 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◦Generate Java code for this view

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

Page 62: Vaadin 7 Today and Tomorrow
Page 63: Vaadin 7 Today and Tomorrow

Vaadin Charts

• 1.0 version was released in Feb 21, 2013

• 1.1 version to be released in April, 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 64: Vaadin 7 Today and Tomorrow
Page 65: Vaadin 7 Today and Tomorrow
Page 66: Vaadin 7 Today and Tomorrow
Page 67: Vaadin 7 Today and Tomorrow
Page 68: Vaadin 7 Today and Tomorrow
Page 69: Vaadin 7 Today and Tomorrow
Page 70: Vaadin 7 Today and Tomorrow
Page 71: Vaadin 7 Today and Tomorrow

Vaadin TouchKit

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

• URLField• Datefield• Combobox

• Preparing WP8 support

Page 72: Vaadin 7 Today and Tomorrow

Vaadin TestBench

• Maintenance releases

Page 73: Vaadin 7 Today and Tomorrow

Vaadin JPAContainer

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

Page 74: Vaadin 7 Today and Tomorrow

Vaadin CDI

• Beta to be released in March • Apache 2.0 License

Page 75: Vaadin 7 Today and Tomorrow

Will not be ported to Vaadin 7

• Spring Roo Plug-in• WSRP Add-on• XS (will be included in Vaadin 7.x later on)

Page 76: Vaadin 7 Today and Tomorrow

One more thing....

Page 78: Vaadin 7 Today and Tomorrow

? [email protected] vaadin.com/joonas

@joonaslehtinen