Hackathon - Building vaadin add on components

76
Hackathon Vaadin & Boost Turku 19-21.4.2013 http://boostvaadinhackathon.eventbrite.com/

description

My presentation at Vaadin Hackathon 19-21.4.2013. The presentation outlines all the step of creating a new Vaadin add-on component from design to deployment and publishing.

Transcript of Hackathon - Building vaadin add on components

Page 1: Hackathon - Building vaadin add on components

HackathonVaadin & Boost Turku19-21.4.2013http://boostvaadinhackathon.eventbrite.com/

Page 2: Hackathon - Building vaadin add on components

Create an awesomeVaadin add-on!

Goal

Page 3: Hackathon - Building vaadin add on components

Rules1-4

personteam

start fromscratch

released invaadindirectory

onlinedemo

Page 4: Hackathon - Building vaadin add on components

Team

Name neededSend team members (name,

email) and team name to [email protected]

Deadline: FridayPrivacy: Public

Page 5: Hackathon - Building vaadin add on components

From scratch

Send code repository URLto [email protected] and

commit regularly throughout the event.

Deadline: FridayPrivacy: Public

Page 6: Hackathon - Building vaadin add on components

Online demo

Usable on browsers you choose (list them in add-on

description) on a public URL

Privacy: Public Deadline: Sun 14:00:00

Page 7: Hackathon - Building vaadin add on components

Directory

Add-on must be publicly available in Vaadin Directory

with link to source and demo.

Privacy: Public Deadline: Sun 14:00:00

Page 8: Hackathon - Building vaadin add on components

ScheduleFriday17:00 Open sign-in (all participants/teams must sign in)18:00 Opening statements and practicalities (Matias Sundberg, Boost Turku)18:15 Competition guidelines, Intro to Vaadin Add-ons (Joonas Lehtinen, CEO of Vaadin)19:00 Start hacking!21:00 Dinner

Saturday11:30 Lunch 12:00 Pitch 101 (Toni Perämäki, Boost Turku)12:30 The Hacking continues15:00 Mid-hackathon status check by teams20:00 Dinner

Sunday10.30 Jury starts interviewing the teams11.30 Lunch14:00 Demo time16:00 Prizes are awarded by the Grand Jury of Destiny

Page 9: Hackathon - Building vaadin add on components

Have FUN!

Page 10: Hackathon - Building vaadin add on components

slides availableat

slideshare.net/joonaslehtinen

Page 11: Hackathon - Building vaadin add on components

Joonas LehtinenVaadin, Founder & CEO

Creating Vaadin Add-on Components

Page 12: Hackathon - Building vaadin add on components

ScopeAdd-on widgets for Vaadin 7 with Maven

Out of scopeThemes, Vaadin 6, Server-side add-ons, data sources

Page 13: Hackathon - Building vaadin add on components

Q & A

ResourcesPointers for more information

TheoryBest practices

PracticeTools

Agenda

Page 14: Hackathon - Building vaadin add on components

Part 1 Theory

Page 15: Hackathon - Building vaadin add on components

NoteThis is a hackathon - we are here to have fun - feel free to break all the best practices

Page 16: Hackathon - Building vaadin add on components
Page 17: Hackathon - Building vaadin add on components
Page 18: Hackathon - Building vaadin add on components

NeedWe can not get

the UX we need with the existing

widgets

Page 19: Hackathon - Building vaadin add on components

Goals• List of • real• quantifiable• requirements• for UX

Page 20: Hackathon - Building vaadin add on components

Nail downthe minimum viable set of supportedbrowser versionswith the customer

Page 21: Hackathon - Building vaadin add on components

Idea =UX [how it is used]+ Tech [how it works]

Page 22: Hackathon - Building vaadin add on components

Always start fromdefined goals -never let idea torule your design

Page 23: Hackathon - Building vaadin add on components
Page 24: Hackathon - Building vaadin add on components

Works with target browsers?

Page 25: Hackathon - Building vaadin add on components

Interactions work with target browsers?

Performance is good enough for target data?

Page 26: Hackathon - Building vaadin add on components

Definition of done for prototype • Includes main use-cases• Works in target browsers• Handles enough data

Page 27: Hackathon - Building vaadin add on components

Never start design or implementation before prototyping browser compatibilityand performance

Page 28: Hackathon - Building vaadin add on components
Page 29: Hackathon - Building vaadin add on components

Design UX and API first. Never continue fromthe prototypeimplementation

Page 30: Hackathon - Building vaadin add on components

Drawing detailedwireframes & mockupsand testing them withusers will savetime later

Page 31: Hackathon - Building vaadin add on components

Shamelessly copy UX.Then your users alreadyknow how to use it.

Page 32: Hackathon - Building vaadin add on components
Page 33: Hackathon - Building vaadin add on components

Aim for multilayereddesign that lets yourusers (developers)change behavior ofyour component

Page 34: Hackathon - Building vaadin add on components
Page 35: Hackathon - Building vaadin add on components

DOM classes and CSS restrictionsmust be documentedto make styling easy

Page 36: Hackathon - Building vaadin add on components
Page 37: Hackathon - Building vaadin add on components
Page 38: Hackathon - Building vaadin add on components

Keep componentproject separatefrom your realapplication project

Page 39: Hackathon - Building vaadin add on components

Demo applicationmust include all featuresand serve as examplefor your users

Page 40: Hackathon - Building vaadin add on components
Page 41: Hackathon - Building vaadin add on components

There is no substitutefor manual testing anduser experience testing

Page 42: Hackathon - Building vaadin add on components

Skip test driven development, but invest in regression testing

Page 43: Hackathon - Building vaadin add on components

Pixel level regression tests take time to set up, but will be worth it

Page 44: Hackathon - Building vaadin add on components

Never trust thatyour changes would notbreak other browsers and skip cross-browser testing

Page 45: Hackathon - Building vaadin add on components

It is impossible to usetoo much time in polishing UX for a reusable component.

Page 46: Hackathon - Building vaadin add on components
Page 47: Hackathon - Building vaadin add on components

commit 7453f467b1

Latest commit to the master branch

Update README.markdown

jojule authored 4 hours ago

Tags Downloads

jojulejojule / / spreadsheetspreadsheet

Files Commits Branches

1 1AdminAdmin UnwatchUnwatch ForkFork Pull RequestPull Request

CodeCode NetworkNetwork Pull Requests Pull Requests Issues Issues Wiki Wiki Stats & GraphsStats & Graphs00 00 00

SSHSSH HTTPHTTP Git Read-OnlyGit Read-Only [email protected]:jojule/spreadsheet.git Read+Write access

Simple spreadsheet component for Vaadin — Read morehttps://vaadin.com/addon/spreadsheet

Clone in Mac Clone in Mac ZIPZIP

master masterbranch:branch: 1

historyhistorynamename ageage messagemessage

design a day ago Developing [Joonas Lehtinen]

src 19 hours ago Version 0.1 [Joonas Lehtinen]

README.markdown 4 hours ago Update README.markdown [jojule]

licensing.txt 19 hours ago Version 0.1 [Joonas Lehtinen]

pom.xml 18 hours ago Fixed add-on name [Joonas Lehtinen]

README.markdown README.markdown

Spreadsheet for VaadinThe widget shows a spreadsheet - either from XLS file or by setting the cell contents programmatically.

This version is very limited and should be considered to be an early alpha -version. Try out the demo to see if it would be useful for you. Imainly built it for an upcoming presentation.

SpreadsheetView class should be also usable in GWT without Vaadin Framework, but then you must implement SpreadsheetModel byyourself.

Dependencies

Apache POI 3.8 - http://poi.apache.org/

Apache Commons Codec 1.5 - Required by POI - http://commons.apache.org/codec/

Release notes

Initial release with severe limitations:

All columns and rows have fixed sizes

No cell styling is supported

No graphs are supported

No merged cells are supported

Performance for larger spreadsheets is really bad

Only one spreadsheet widget is supported on screen at once

License & Author

Apache License 2.0

Joonas Lehtinen - https://vaadin.com/joonas

spreadsheet /

ExploreExplore GistGist BlogBlog HelpHelp jojulejojuleSearch…35

https://github.com/jojule/spreadsheet

Page 48: Hackathon - Building vaadin add on components

commit 7453f467b1

Latest commit to the master branch

Update README.markdown

jojule authored 4 hours ago

Tags Downloads

jojulejojule / / spreadsheetspreadsheet

Files Commits Branches

1 1AdminAdmin UnwatchUnwatch ForkFork Pull RequestPull Request

CodeCode NetworkNetwork Pull Requests Pull Requests Issues Issues Wiki Wiki Stats & GraphsStats & Graphs00 00 00

SSHSSH HTTPHTTP Git Read-OnlyGit Read-Only [email protected]:jojule/spreadsheet.git Read+Write access

Simple spreadsheet component for Vaadin — Read morehttps://vaadin.com/addon/spreadsheet

Clone in Mac Clone in Mac ZIPZIP

master master 1

historyhistorynamename ageage messagemessage

design a day ago Developing [Joonas Lehtinen]

src 19 hours ago Version 0.1 [Joonas Lehtinen]

README.markdown 4 hours ago Update README.markdown [jojule]

licensing.txt 19 hours ago Version 0.1 [Joonas Lehtinen]

pom.xml 18 hours ago Fixed add-on name [Joonas Lehtinen]

README.markdown README.markdown

Spreadsheet for VaadinThe widget shows a spreadsheet - either from XLS file or by setting the cell contents programmatically.

This version is very limited and should be considered to be an early alpha -version. Try out the demo to see if it would be useful for you. Imainly built it for an upcoming presentation.

SpreadsheetView class should be also usable in GWT without Vaadin Framework, but then you must implement SpreadsheetModel byyourself.

Dependencies

Apache POI 3.8 - http://poi.apache.org/

Apache Commons Codec 1.5 - Required by POI - http://commons.apache.org/codec/

Release notes

Initial release with severe limitations:

All columns and rows have fixed sizes

No cell styling is supported

No graphs are supported

No merged cells are supported

Performance for larger spreadsheets is really bad

Only one spreadsheet widget is supported on screen at once

License & Author

Apache License 2.0

Joonas Lehtinen - https://vaadin.com/joonas

spreadsheet /

ExploreExplore GistGist BlogBlog HelpHelp jojulejojuleSearch…35

Page 49: Hackathon - Building vaadin add on components
Page 50: Hackathon - Building vaadin add on components
Page 51: Hackathon - Building vaadin add on components
Page 52: Hackathon - Building vaadin add on components
Page 53: Hackathon - Building vaadin add on components
Page 54: Hackathon - Building vaadin add on components
Page 55: Hackathon - Building vaadin add on components

Try out my Spreadsheet!vaadin.com/addon/spreadsheet

Page 57: Hackathon - Building vaadin add on components
Page 58: Hackathon - Building vaadin add on components
Page 59: Hackathon - Building vaadin add on components

Issue reported by actual user!

Fix immediately and thank the user who reported it

Fix after 6 months, maybe...

Ignore. wont-fix in best case.(the usual open source way)

Support HOWTO

Page 60: Hackathon - Building vaadin add on components

Part 2 Practice

Page 61: Hackathon - Building vaadin add on components

Unique name

Vaadin XYZ

XYZ for Vaadin

[Use some time for the name, it is really really important]

Naming

Page 62: Hackathon - Building vaadin add on components

Communication 1/3

server

client

Component

Widget

Connector

RPC

State

Page 63: Hackathon - Building vaadin add on components
Page 64: Hackathon - Building vaadin add on components

Communication 2/3

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

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

public Button() { registerRpc(rpc);}

serverclient

Page 66: Hackathon - Building vaadin add on components

Creating a project (1/2)vaadin-archetype-widget

1

3

2

Page 67: Hackathon - Building vaadin add on components

Creating a project (2/2)

Server-side Component

Client-side Widget

Connector

Built in widget stylesThemeDemo

Documentation

Page 68: Hackathon - Building vaadin add on components

Packaging

1

Page 69: Hackathon - Building vaadin add on components

Debugging server-side

1

2

3

Page 70: Hackathon - Building vaadin add on components

Debuggingclient-side

14

3

2

Page 71: Hackathon - Building vaadin add on components

Debuggingclient-side(superdev)

1

4

5

2

<set-configuration-property name="devModeRedirectEnabled" value="true" />

DemoWidgetSet.gwt.xml

3

http://localhost:8080/foo/?superdevmode

Page 72: Hackathon - Building vaadin add on components

Publishing source

1

3

git init . 1

or

2

git commit -a

4

Page 73: Hackathon - Building vaadin add on components

Publishing demo

Check: DemoWidgetSet.gwt.xml1

2

3

4

5

6

http://joonas.jelastic.servint.net/ttcb/

7

Page 74: Hackathon - Building vaadin add on components

Publishing packaging

Set version in pom.xml1

2

3

Upload yourcomponent.zipfrom yourcomponent/target

4

Page 75: Hackathon - Building vaadin add on components

Part 3 Resources