Vaadin Touchkit 4

50
Jeroen Benats Vaadin TouchKit Vaadin’s mobile framework

description

These slides briefly describe what Vaadin TouchKit is all about. I just gave this presentation to a group of people I'm coaching to get the best out of their Vaadin project!

Transcript of Vaadin Touchkit 4

Page 1: Vaadin Touchkit 4

Jeroen Benats

Vaadin TouchKit Vaadin’s mobile framework

Page 2: Vaadin Touchkit 4

TouchKit?

Page 3: Vaadin Touchkit 4

Why use it…

…when you have Vaadin?

• Screen size • Finger accuracy • Native Look&Feel for iOS

!• Vaadin 7 can be made responsive

• CSS @media queries

Page 4: Vaadin Touchkit 4

Benefits?

Page 5: Vaadin Touchkit 4

All componentsYou already have the knowledgeAll regular components are available

Page 6: Vaadin Touchkit 4

TouchKit components Specifically for mobile devices

Page 7: Vaadin Touchkit 4

Reuse code Less duplication

Page 8: Vaadin Touchkit 4

Supports a lot!GeoLocation Home Screen launching Splash ScreenOffline mode

Page 9: Vaadin Touchkit 4

You ca

n go e

ven fu

rther!

Page 10: Vaadin Touchkit 4

Licence?AGPL - FREECVAL - $590 / DEV

Page 11: Vaadin Touchkit 4

Licence?The choice is yours!

Page 12: Vaadin Touchkit 4

Licence?

Page 13: Vaadin Touchkit 4

Issues you need to consider

Page 14: Vaadin Touchkit 4

Mobile user interface

❖ Other than regular computers (rotation, …)

❖ Finger instead of mouse

❖ No right-finger-click

❖ Double-tap usually not used

❖ No physical keyboard

❖ Changes, depending on the context

Page 15: Vaadin Touchkit 4

Bandwidth and Performance

❖ Client-side engine can take some time to load

❖ > Only compile widgetset with used components

❖ Latency is very important for mobile

❖ > Limit the use of immediate

❖ Use components can affect performance

❖ > TouchKit components are light-weight

❖ > CssLayout

Page 16: Vaadin Touchkit 4

Compatibility

❖ TouchKit focuses on WebKit

❖ Leading mobile browser core (69% mobile market)

❖ Back-button

❖ Android devices have a dedicated back-button

❖ iOS doesn’t

❖ > URI fragments can be used to cover this

Page 17: Vaadin Touchkit 4

Components

Page 18: Vaadin Touchkit 4

NavigationView

• Navigation bar • Content area

Page 19: Vaadin Touchkit 4

NavigationView

❖ Often used inside a NavigationManager

❖ > View change animations

❖ Full size by default

❖ setExpandRatio(content_area, 1)

Page 20: Vaadin Touchkit 4

NavigationView

❖ NavigationBar

❖ “Go left” + caption + “Go right”

❖ setLeftComponent() + setCaption() + setRightComponent()

❖ Toolbar area

❖ setToolBar()

❖ Can be any component

❖ TouchKit provides a specific ToolBar

❖ Is a CssLayout

Page 21: Vaadin Touchkit 4

NavigationManager❖ Takes care of sliding

animations

❖ 3 components can be set

Page 22: Vaadin Touchkit 4

❖ setPreviousComponent()

❖ setCurrentComponent()

❖ setNextComponent()

❖ Previous and next components are cached

NavigationManager

RESPONSIVENESS!

Page 23: Vaadin Touchkit 4

NavigationManager

Page 24: Vaadin Touchkit 4

NavigationManager

Triggered on manager.navigateTo()

Page 25: Vaadin Touchkit 4

or in the view…

Page 26: Vaadin Touchkit 4

NavigationManager

Page 27: Vaadin Touchkit 4

NavigationButton

• Special version of Button • Navigating in a NavigationManager

Page 28: Vaadin Touchkit 4

NavigationButton

Page 29: Vaadin Touchkit 4

recommended for performance…

Page 30: Vaadin Touchkit 4

NavigationButton

Dynamically loading views

Page 31: Vaadin Touchkit 4

Popover

• Like a Vaadin sub-Window • Fixed • Most useful for tablet devices

Page 32: Vaadin Touchkit 4

Popover

Page 33: Vaadin Touchkit 4

SwipeView

• Is a wrapper • Navigation between views by swiping

left or right • Works together with a

NavigationManager

Page 34: Vaadin Touchkit 4

Switch

• Mobile CheckBox alternative

Page 35: Vaadin Touchkit 4

VerticalComponentGroup

• Vertical stack with border • Typically used with NavigationButtons

Page 36: Vaadin Touchkit 4

HorizontalButtonGroup

• Intended for grouping Buttons in slots of a VerticalComponentGroup

Page 37: Vaadin Touchkit 4

TabBarView

• Tab bar with content area

Page 38: Vaadin Touchkit 4

Input fields

• EmailField • NumberField • UrlField

Page 39: Vaadin Touchkit 4

Advanced topics

Page 40: Vaadin Touchkit 4

Fallback UI

Page 41: Vaadin Touchkit 4
Page 42: Vaadin Touchkit 4

GeoLocation

Page 43: Vaadin Touchkit 4
Page 44: Vaadin Touchkit 4

Storing data in the Local Storage

Page 45: Vaadin Touchkit 4
Page 46: Vaadin Touchkit 4

Getting data from the Local Storage

Page 47: Vaadin Touchkit 4
Page 48: Vaadin Touchkit 4

Certainly read…

Page 49: Vaadin Touchkit 4

Certainly read…20.10. Building an Optimized Widget Set

Page 50: Vaadin Touchkit 4