Top Banner
67

An Introduction to Sencha Touch

Nov 17, 2014

Download

Technology

James Pearce

In introduction to mobile web applications and the Sencha Touch framework
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: An Introduction to Sencha Touch
Page 2: An Introduction to Sencha Touch

James Pearce Sr Director, Developer Relations @ jamespearce [email protected]

Page 3: An Introduction to Sencha Touch

An Introductionto

Sencha Touch

Page 4: An Introduction to Sencha Touch

Create amazing appsbuilt

on web standards“

Page 5: An Introduction to Sencha Touch

Documents

Applications

Page 6: An Introduction to Sencha Touch

Thin client

Thick client

Page 7: An Introduction to Sencha Touch

One PC

Multiple devices

Page 8: An Introduction to Sencha Touch

Sedentary usage

Mobile usage

Page 9: An Introduction to Sencha Touch

But everyone loves apps

Page 10: An Introduction to Sencha Touch
Page 11: An Introduction to Sencha Touch
Page 12: An Introduction to Sencha Touch
Page 13: An Introduction to Sencha Touch

PalmMicrosoft

Apple

Android

RIM RIMAndroidAppleMicrosoftPalm

Top U.S. Smartphone Platforms,3 Month Average Ending December 2010

comScore MobiLens 2010

Java

J2ME

Air

C++

C#

Obj-C

JS

The native challenge

Page 14: An Introduction to Sencha Touch
Page 15: An Introduction to Sencha Touch
Page 16: An Introduction to Sencha Touch

Cross-platformFamiliar skills & toolsDecentralizedEasily updatedIndexedWell-understood technologies

A return to the web

Page 17: An Introduction to Sencha Touch
Page 18: An Introduction to Sencha Touch

A New Mobile App Stack

Javascript

Semantic HTML

CSS Styling & Layout

WebFonts Video Audio Graphics

Worker Parallel

Processing

File SystemsDBs

App Cache

x-AppMessaging

Device Access

Camera

Location

Contacts

SMS

Orientation

Gyro

Server & Services

HTTP

AJAX

Events

Sockets

SSL

More...

Page 19: An Introduction to Sencha Touch
Page 20: An Introduction to Sencha Touch
Page 21: An Introduction to Sencha Touch
Page 22: An Introduction to Sencha Touch
Page 23: An Introduction to Sencha Touch
Page 24: An Introduction to Sencha Touch

?

Page 25: An Introduction to Sencha Touch

IntroducingSencha Touch

Page 26: An Introduction to Sencha Touch

The first JavaScript framework for building rich mobile apps with web standards

Page 27: An Introduction to Sencha Touch
Page 28: An Introduction to Sencha Touch
Page 29: An Introduction to Sencha Touch
Page 30: An Introduction to Sencha Touch

Layouts & components Theming & icons Orientation & animationTouch events & scrollerData packageMVC framework

What’s in Sencha Touch?

Page 31: An Introduction to Sencha Touch

Lists - Nested, Grouped, SortableCarouselPickerOverlaySliderForms & fieldsToolbars & buttonsHTML5 - Audio - Video - GeoLocation

Components

Page 32: An Introduction to Sencha Touch

Forms

Page 33: An Introduction to Sencha Touch

ScrollingMomentum/bounce physics

Hardware accelerated

Throughout all components: - Lists - Carousel - Pickers

Page 34: An Introduction to Sencha Touch

Touch EventsBuilt on native events

Abstracted for performance

Additional events - Tap - Double tap - Tap and hold - Swipe - Rotate - Drag & drop

Page 35: An Introduction to Sencha Touch

Data PackageModels, Stores, and Proxies - Associations - Validation - Local & server storage

Easily consume web services - JSON/P - XML - YQL

Page 36: An Introduction to Sencha Touch

Use CSS3 & SASS - Flexible themes - Highly optimized

e.g.

Theming

$base-color: #ff6699

Page 37: An Introduction to Sencha Touch

“The Kitchen Sink”

http://sencha.com/x/5e

Page 38: An Introduction to Sencha Touch

ArchitecturalConsiderations

Page 39: An Introduction to Sencha Touch

The classic web stack

Storage

Business logic

User interfacereq/res

Rendering

Page 40: An Introduction to Sencha Touch

The next web stack

Storage

Security Business logic

User interfacesync

Storage

Page 41: An Introduction to Sencha Touch

Write once,run anywhere?

Page 42: An Introduction to Sencha Touch

Not quite.

Page 43: An Introduction to Sencha Touch

The Mobile Webis not a

320px Web“

Page 44: An Introduction to Sencha Touch
Page 45: An Introduction to Sencha Touch

But you can re-usea lot of code

Page 46: An Introduction to Sencha Touch

Proxies

Models

Controllers

Stores

Views Views

json

Page 47: An Introduction to Sencha Touch

buttoncomponentcontainerdataviewdatepickerpanelsliderspacertoolbartabpanel

actionsheetaudiocarousellistmapnestedlistpickerpickerslotsegbuttonsheettabbarvideo

buttongroupcolorpalette

cycleeditor

editorgridgrid

multisliderprogresssplitbuttontreepanelviewportwindow

Ext JS Sencha Touch

Page 48: An Introduction to Sencha Touch

User InterfaceComponents

Page 49: An Introduction to Sencha Touch

Listvar list = new Ext.List({ store: store, itemTpl: '{firstName} {lastName}', grouped: true, indexBar: true});

Page 50: An Introduction to Sencha Touch

Nested Listvar list = new Ext.NestedList({ store: store, displayField: 'name', title: 'My List', updateTitleText: true, getDetailCard: function(record, parent) {..}});

Page 51: An Introduction to Sencha Touch

Carouselvar car = new Ext.Carousel({ direction: 'horizontal', indicator: true, items: [ .. ]});

Page 52: An Introduction to Sencha Touch

Sheetsvar sheet = new Ext.ActionSheet({ items: [ { text: 'Delete draft', ui: 'decline' }, { text: 'Save draft' }, { text: 'Cancel', } ]});sheet.show();

Page 53: An Introduction to Sencha Touch
Page 54: An Introduction to Sencha Touch

A TypicalApplication

Page 55: An Introduction to Sencha Touch
Page 56: An Introduction to Sencha Touch

http://senchalearn.github.com/seattlebars/

Page 57: An Introduction to Sencha Touch

APIs at work...

Location API to get lat/long

MongoLabs to get city name

Yelp to get businesses

Page 58: An Introduction to Sencha Touch

https://github.com/senchalearn/seattlebars

Page 59: An Introduction to Sencha Touch

Final Thoughts

Page 60: An Introduction to Sencha Touch

Thick client, thin server

The shortfall in the cloud

Page 61: An Introduction to Sencha Touch

Location Services

Image Serving

AnalyticsAdaptation

Video Serving

Data SyncWeb Fonts

Ad Serving

Commerce$

Network APIs

Page 62: An Introduction to Sencha Touch

http://mysite.com/myimage.png

http://src.sencha.io/http://mysite.com/myimage.png

Page 63: An Introduction to Sencha Touch

A platform that allows you to package web applicationsand get access to device APIs

http://phonegap.com

PhoneGap

Page 64: An Introduction to Sencha Touch

+

Page 65: An Introduction to Sencha Touch

Apps vs Web technologybuilt with

Page 66: An Introduction to Sencha Touch
Page 67: An Introduction to Sencha Touch

James Pearce Sr Director, Developer Relations @ jamespearce [email protected]