calatrava

33
Hybrid Mobile Apps with Calatrava Vivek Jain

Upload: vivek-jain

Post on 16-Aug-2015

75 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Calatrava

Hybrid Mobile Apps with Calatrava

Vivek Jain

Page 2: Calatrava

Development

Approaches

Page 3: Calatrava

Native app for each platform

User Experience

Separate teams/skillset

Device capabilities

App Store

Expensive

High maintenance

Page 4: Calatrava

Web App for all platforms

Single team/skillset

Limited device capabilities

Affordable

Standard UX

No App Store

Page 5: Calatrava

Web AppNative Apps

Affordability

User Experience

Page 6: Calatrava

Product Vs Channel

Page 7: Calatrava

Ultimate Goal

Use

r Exp

eri

en

ce

Line of deployment

Awesome apps

Page 8: Calatrava

Implementation Strategy

Laser Cover-your-bases

Use

r Exp

eri

en

ceLine of deployment

Page 9: Calatrava

Native Apps

Affordability

User Experience

Single teamNative where requiredShared everywhere else

Hybrid Approach

Web App

Page 10: Calatrava

Separated Presentation

BodyUI

Page 11: Calatrava

Hybrid UI

Page 12: Calatrava

Hybrid UI

Page 13: Calatrava

Enter Calatrava

Page 14: Calatrava
Page 15: Calatrava

Bridge KernelPage

BodyUI

Bridging to and from Native

JavaScript

Page 16: Calatrava

Bridge KernelDevice specific code

Not just for UI

Page 17: Calatrava

Allows Incremental release strategy

Release 1 Release 2

iOS

Android

Web

iOS

Android

Web

Page 18: Calatrava

Affordability

User Experience

Evolve incrementally

Page 19: Calatrava

Extend existing app

Native Only Native + Shared

Page 20: Calatrava

When to use

• complex client-side business logic

• when mobile is a channel• not a pure UI app (like a game)

• web experience is not good enough• cover-you-bases implementation strategy• additional features in an existing app

Page 21: Calatrava

Platforms supported

Page 22: Calatrava

Structure of a

Calatrava Project

Page 23: Calatrava

kernelapppluginsspec

shellpages

assetslib

droidiosweb

Page 24: Calatrava

Pages - logical screen on the app

• View Controller on iOS

• Activity on Android

• div on Mobile Web

Page 25: Calatrava

Pages - manages the UI

• bind to events

• extract data

• render data

Page 26: Calatrava

Bridge

• API for kernel to interact with native

• calatrava.bridge.• pages• changePage• request• plugins

Page 27: Calatrava

Kernel

• business & flow/interaction logic• features under kernel/app• gets references to pages from the bridge • specs under kernel/spec

Page 28: Calatrava

Shell

• optional HTML UI for sharing

• contains pages in HTML and JS

• recommend to start with entire UI in shell• Web App for free

Page 29: Calatrava

Plugins

• for device specific code

• single interface in kernel• specific implementation for each platform

Page 30: Calatrava

Tech Used

• coffee-script

• jasmine-node

• haml

• rake (for build scripts)

Page 31: Calatrava

Getting Started

gem install calatravacalatrava create <project-name>

Home: calatrava.github.com

Page 32: Calatrava

Demo

Page 33: Calatrava

Thank You

[email protected] @vivekjain10

References• martinfowler.com/articles/multiMobile/• martinfowler.com/articles/mobileImplStrategy.html• calatrava.github.com

Questions?

Join ThoughtWorks: join.thoughtworks.com