calatrava

27
Bridging the gap between mobile platforms @AtreyeeMaiti Atreyee @anand_agrawal anandagrawal84 Discover the new framework ‘Calatrava’ for Cross platform collaboration

Upload: atreyeemaiti

Post on 19-Jun-2015

399 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Calatrava

Bridging the gap between mobile platforms

@AtreyeeMaiti Atreyee@anand_agrawal anandagrawal84

Discover the new framework ‘Calatrava’ for Cross platform collaboration

Page 2: Calatrava

Where mobile app market is going?

▪ Opens up a new channel

▪ Mobile first strategy

Page 3: Calatrava

Where to start?

Page 4: Calatrava

How to start?

▪ Native?

▪ Mobile web?

Page 5: Calatrava

Trade offs

Native Apps

Affordability

User Experience

Web App

Page 6: Calatrava

How about off the shelf cross platform?

Lots of promises▪ Code reusability

▪ Faster and easier development

▪ Easy to test

Page 7: Calatrava

How about off the shelf cross platform?

BUT…▪ May just mimic the native control’s look

▪ May limit the control on the native controls

▪ Dependency on 3rd party for new features

Hence, Sub-optimal User Experience.

Page 8: Calatrava

What are typical app components?

▪ UI

▪ Application Logic (Presentation/Business logic/Navigation)

▪ Local Storage

▪ Web services

Page 9: Calatrava

What are the reusable components?

iPhone

Android

Web

UI Client logic

Back-end

Page 10: Calatrava

Hybrid Approach

Native Apps

Affordability

User Experience

Native where requiredShared everywhere else

Web App

Page 11: Calatrava

How is it different from cross platform?

▪ No restriction to APIs / features exposed by framework

▪ Easier extensibility

▪ Easy to plugin native components wherever required

Page 12: Calatrava

Calatrava

Available at: http://calatrava.github.com/

Credits: Giles Alexander

Page 13: Calatrava

Overview of calatrava

13

BRIDGE

NATIVE

CODE

SHARED LOGIC

[Controllers, models, repositories]

KERNEL (javascript)

BRIDGE (javascript)

[shared native objects]

SHELL (haml, css, javascript,native where necessary)

[page objects, layouts]

Page 14: Calatrava

kernel app plugins spec

shell pages

assets lib

droid

ios

web

Basic structure of a calatrava project

Page 15: Calatrava

Handpicking native where required

Page 16: Calatrava

Page Object

KernelBridge

ClickTrigger event

Lookup for convention basedcontroller

JS evaluator

Page render called with appropriate data

Invoke render with data

Results shown

Sample flow

Page 17: Calatrava

Sample flow

Page Object

Kernel

Bridge

KernelBridge

Page Object

Bridge

Click

Trigger event

Lookup for convention basedcontroller

JS evaluator

Ajax call to fetch results

Response

fetch results

JS evaluatorPage render called with appropriate data

Invoke render with data

Results shown

Page 18: Calatrava

DEMO

Page 19: Calatrava

Plugins

▪ Mechanism to use native features cross platform.

▪ Need to be registered with calatrava

▪ Convention based

Page 20: Calatrava

Tech stack

▪ Coffee-script

▪ Haml

▪ Sass

▪ Java

▪ Objective C

▪ Jasmine

▪ Cucumber

▪ Rake

}}} }

Kernel + Shared HTML UI

Native UI, plugin implementations

Testing

Build

Page 21: Calatrava

Strengths

Developer’s perspective:

Structure to quickly build features, share code

Testability Needs stronger

javascript skills rather than objective c / java etc

Business perspective:

Hook into existing native app Free mobile web app Ease of adding new feature Mobile as a channel, less feature

parity Time to market same for all

platforms

Page 22: Calatrava

Platforms supported

Page 23: Calatrava

When not to use calatrava

UI AL

UI AL

Services

Shared logic

Page 24: Calatrava

Roadmap…

▪ Calatrava is evolving

▪ Plugins are being actively developed

▪ Generating controllers, pages for new features

▪ Anything that you could think of?

Page 25: Calatrava

Frameworks implementing Hybrid approach

▪ Kirinjs

▪ Cordova

Page 27: Calatrava

Questions??