building a mobile app with sencha touch

37
Sencha Touch @ jamespearce

Upload: james-pearce

Post on 05-Dec-2014

3.439 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Building a Mobile App with Sencha Touch

Sencha Touch@ jamespearce

Page 2: Building a Mobile App with Sencha Touch

A JavaScript frameworkfor building

rich mobile appswith web standards

Page 3: Building a Mobile App with Sencha Touch

http://sencha.com/touch

Page 4: Building a Mobile App with Sencha Touch

Components

Page 5: Building a Mobile App with Sencha Touch

Data access & MVC

Page 6: Building a Mobile App with Sencha Touch

Forms

Page 7: Building a Mobile App with Sencha Touch

Scrolling

Page 8: Building a Mobile App with Sencha Touch

Touch Events

Page 9: Building a Mobile App with Sencha Touch

Theming

Page 10: Building a Mobile App with Sencha Touch

Charts

Page 11: Building a Mobile App with Sencha Touch

Kitchen Sink

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

Page 12: Building a Mobile App with Sencha Touch
Page 13: Building a Mobile App with Sencha Touch
Page 14: Building a Mobile App with Sencha Touch

<!DOCTYPE  html><html>    <head>            <title>Hello  World</title>

       <script  src="lib/touch/sencha-­‐touch.js"></script>        <script  src="app/app.js"></script>                <link  href="lib/touch/resources/css/sencha-­‐touch.css"                      rel="stylesheet"  type="text/css"  />        </head>    <body></body></html>

Page 15: Building a Mobile App with Sencha Touch

new  Ext.Application({

       launch:  function()  {

               new  Ext.Panel({                        fullscreen:  true,                        dockedItems:  [{xtype:'toolbar',  title:'My  First  App'}],                        layout:  'fit',                        styleHtmlContent:  true,                        html:  '<h2>Hello  World!</h2>I  did  it!'                });

       }

});

Page 16: Building a Mobile App with Sencha Touch
Page 17: Building a Mobile App with Sencha Touch

Lists

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

Page 18: Building a Mobile App with Sencha Touch

Nested Lists

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

Page 19: Building a Mobile App with Sencha Touch

Carousels

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

Page 20: Building a Mobile App with Sencha Touch

Sheets

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

sheet.show();

Page 21: Building a Mobile App with Sencha Touch

Common patterns1

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

var  panel  =  new  Ext.Panel({        fullscreen:  true,        layout:  'fit',        items:  [list]});

Page 22: Building a Mobile App with Sencha Touch

Common patterns2

var  panel  =  new  Ext.Panel({        fullscreen:  true,        layout:  'fit',        items:  [{                xtype:  'list',                store:  store,                itemTpl:  '{firstName}  {lastName}',                grouped:  true,                indexBar:  true        }]});

Page 23: Building a Mobile App with Sencha Touch

Let’s code

Page 24: Building a Mobile App with Sencha Touch

Further thoughts...

Page 25: Building a Mobile App with Sencha Touch

Embrace hybrid

Page 26: Building a Mobile App with Sencha Touch

Nativeness

Com

prom

ise

Nativeapps

Websites

Webapps

Hybridapps

Page 27: Building a Mobile App with Sencha Touch

Embrace the device

Page 28: Building a Mobile App with Sencha Touch

http://sencha.com/x/cy http://sencha.com/x/de

Page 29: Building a Mobile App with Sencha Touch

Embrace the tools

Page 30: Building a Mobile App with Sencha Touch

http://phonegap.github.com/weinre

Page 31: Building a Mobile App with Sencha Touch

Embrace responsiveness

Page 32: Building a Mobile App with Sencha Touch

http://sencha.com/x/cv

Page 33: Building a Mobile App with Sencha Touch

Embrace o!ine

Page 34: Building a Mobile App with Sencha Touch

$>  phantomjs  confess.js  http://mysite.com/

CACHE  MANIFEST

#  This  manifest  was  created  by  confess.js#                    Time:  Wed  Sep  14  2011  10:14:45  GMT-­‐0700  (PDT)#        User-­‐agent:  Mozilla/5.0  ...

CACHE:app/app.jsapp/yelp.jshttp://cdn.sencha.io/touch/1.1.0/sencha-­‐touch.jshttp://maps.google.com/maps/api/js?sensor=truehttp://maps.gstatic.com/intl/en_us/mapfiles/api-­‐3/6/4/main.jstheming/app.css

NETWORK:*

http://github.com/jamesgpearce/confess

Page 35: Building a Mobile App with Sencha Touch

Embrace mobile

Page 36: Building a Mobile App with Sencha Touch

Mobile Apps vs Web Technologybuilt with

Page 37: Building a Mobile App with Sencha Touch

James Pearce @ jamespearce