Building i pad apps in pure java with vaadin

Preview:

DESCRIPTION

My JavaOne 2012 presentation on how to build iPad applications in Java with Vaadin

Citation preview

Joonas Lehtinen@joonaslehtinen

Building iPad Apps in Pure Java with Vaadin

2010

Today~ 100M iPads shipped

~70% of tablet marketshare

A Year Ago“93% of Fortune 500

companies have deployed or are testing iPads”

- Apple

So, how do I develop for iPad?

?

Vaadin is a UI framework

for rich web applications

htmljava

123ideas

1RichComponents

InMemory, Bean, Method, Collection, JDBC, JPA, Hibernate, TextFile, FileSystem, Properties, EclipseLink, Lucene, Mockups, GAE, ...

2Server + Client

Layers of abstraction

JavaScriptJava toJavaScript

Webserver

Backendserver

required optional optionalrequired

RPC

optional

Vaa

din

required optionalrequired

GW

T

requiredrequired

Ext

JS

requiredrequired

required required

Architecture

3EmbracingJava

Componentsare justPOJOs

Any JVMLanguage

Any JavaIDE & Tools

Most JavaServers, Portals &Clouds

ApacheLicense

VaadinTouchKit

Apple iOS theme

Mobile components• TouchKitWindow• Navigation manager• NavigationBar• NavigationButton• SwipeView• PopoverWindow• Tabsheets• Toolbar• Switch

Offline mode

What kind of iPad apps are we talking about?

PumaProduct portfolio management

Developing with Vaadin TouchKit

How does it work, really?

• Initial HTML• CSS (theme)• Images• JavaScript

830k total

250k

compress

120k

reducedwidgetset

• name=”Joonas”• button clicked

150 bytes

• name=”Joonas”• button clicked

150 bytes

• Add notification

466 bytes

gettingstarted

mvn archetype:generate-DarchetypeGroupId=com.vaadin-DarchetypeArtifactId=vaadin-archetype-touchkit-DarchetypeVersion=LATEST

Maven

mvn package jetty:run-war

Free Bookvaadin.com/book

~700 pages

Vaadin 7 Draft Edition

US $29.95

Vaadin is an open source Java framework for building modern web applications that look great, perform well and make you and

your users happy. http://vaadin.com/

2675387895299

ISBN 978-952-92-6753-890000

Get a free copyat Vaadin booth

By Marko Grönroos

ABOUT VAADIN

ww

w.d

zone

.co

m

G

et M

ore

Ref

card

z! V

isit

ref

card

z.co

m

#85

Getting Started with VaadinCONTENTS INCLUDE:�� About Vaadin�� Creating An Application�� Components �� Layout Components�� Themes�� Data Binding and more...

Vaadin is a server-side Ajax web application development framework that allows you to build web applications just like with traditional desktop frameworks, such as AWT or Swing. An application is built from user interface components contained hierarchically in layout components.

In the server-driven model, the application code runs on a server, while the actual user interaction is handled by a client-side engine running in the browser. The client-server communications and any client-side technologies, such as HTML and JavaScript, are invisible to the developer. As the client-side engine runs as JavaScript in the browser, there is no need to install plug-ins. Vaadin is released under the Apache License 2.0.

Figure 1: Vaadin Client-Server Architecture

If the built-in selection of components is not enough, you can develop new components with the Google Web Toolkit (GWT)

Figure 2: Architecture for Vaadin Applications

Hot Tip

You can get a reference to the application object from any component attached to the application with ��$!!����$� ���

Event ListenersIn the event-driven model, user interaction with user interface components triggers server-side events, which you can handle

Web BrowserClient-Side Engine

JavaWeb Server

VaadinUIComponents

YourJavaApplication

WebService

EJB

DB

Servlet Container

UserApplication

EventListener

DataModel

ApplicationThemes

ApplicationResources

DefaultTheme

FileResources

ExternalResources

Database

DataBinding

Inherits Events Changes

AJAX Requests

Inherits

UIComponent

JavaServlet

ApplicationClass

Web BrowserClient-Side Engine

brought to you by...

Questions?Comments?

joonas@vaadin.com vaadin.com/joonas

@joonaslehtinen#vaadin

InvitationJoin us today 5pm for Vaadin & GWT meet-up at Hotel Serrano (100 yards from Hilton)

Super dev mode & Elemental in GWT 2.5Ray Cromwell / Google

Vaadin 7 Client-Server Hybrid AppsJoonas Lehtinen / Vaadin

Errai 2.1Mike Brock / Red Hat

RUMS/NASA demoGeorge Soler / SAIC

Please register at http://bit.ly/vaadin-gwt-meetup