SlideShare a Scribd company logo
An Introduction to Sencha Touch
James Pearce
 Sr Director, Developer Relations

 @ jamespearce
   jamesp@sencha.com
An Introduction
       to
 Sencha Touch
“   Create amazing apps
            built
     on web standards
                          ”
Documents


Applications
Thin client


Thick client
One PC


Multiple devices
Sedentary usage


 Mobile usage
But everyone loves apps
An Introduction to Sencha Touch
An Introduction to Sencha Touch
An Introduction to Sencha Touch
The native challenge
             JS
        C# Palm   J2ME
    Microsoft

                        RIM           RIM
                                      Android
                                      Apple
Apple                     Air         Microsoft
                                      Palm
Obj-C
                       Java
         C++ Android


                                        Top U.S. Smartphone Platforms,
                                3 Month Average Ending December 2010
                                               comScore MobiLens 2010
An Introduction to Sencha Touch
An Introduction to Sencha Touch
A return to the web
Cross-platform
Familiar skills & tools
Decentralized
Easily updated
Indexed
Well-understood technologies
An Introduction to Sencha Touch
A New Mobile App Stack
                WebFonts        Video      Audio    Graphics
Device Access                                                  Server & Services

  Camera                    CSS Styling & Layout                    HTTP

  Location                                                          AJAX
                                   Javascript
  Contacts                                                          Events

    SMS                          Semantic HTML                     Sockets

 Orientation                                                         SSL
                 File Systems        Worker
                                                    x-App
    Gyro              DBs            Parallel                      More...
                                                   Messaging
                  App Cache         Processing
An Introduction to Sencha Touch
An Introduction to Sencha Touch
An Introduction to Sencha Touch
An Introduction to Sencha Touch
An Introduction to Sencha Touch
?
Introducing
Sencha Touch
The first JavaScript framework for building
  rich mobile apps with web standards
An Introduction to Sencha Touch
An Introduction to Sencha Touch
An Introduction to Sencha Touch
What’s in Sencha Touch?
Layouts & components
Theming & icons
Orientation & animation
Touch events & scroller
Data package
MVC framework
Components
Lists
- Nested, Grouped, Sortable
Carousel
Picker
Overlay
Slider
Forms & fields
Toolbars & buttons
HTML5
- Audio
- Video
- GeoLocation
Forms
Scrolling
Momentum/bounce physics

Hardware accelerated

Throughout all components:
- Lists
- Carousel
- Pickers
Touch Events
Built on native events

Abstracted for performance

Additional events
- Tap
- Double tap
- Tap and hold
- Swipe
- Rotate
- Drag & drop
Data Package
Models, Stores, and Proxies
- Associations
- Validation
- Local & server storage

Easily consume web services
- JSON/P
- XML
- YQL
Theming
Use CSS3 & SASS
- Flexible themes
- Highly optimized




e.g.

$base-color: #ff6699
“The Kitchen Sink”




                 http://sencha.com/x/5e
Architectural
Considerations
The classic web stack


                 req/res
User interface             Rendering
Business logic
   Storage
The next web stack



                   User interface
            sync
Security           Business logic
Storage               Storage
Write once,
run anywhere?
Not quite.
“   The Mobile Web
        is not a


                     ”
      320px Web
An Introduction to Sencha Touch
But you can re-use
   a lot of code
Views                 Views

        Controllers
         Models
          Stores
         Proxies
            json
Ext JS                   Sencha Touch
        buttongroup                   actionsheet
     colorpalette        button          audio
          cycle       component            carousel
        editor         container             list
  editorgrid           dataview                map
        grid          datepicker                nestedlist
multislider                panel                picker
  progress                slider                pickerslot
splitbutton               spacer                segbutton
  treepanel              toolbar               sheet
    viewport            tabpanel             tabbar
       window                              video
User Interface
Components
List
var list = new Ext.List({
  store: store,
  itemTpl:
    '{firstName} {lastName}',
  grouped: true,
  indexBar: true
});
Nested List
var list = new Ext.NestedList({
  store: store,
  displayField: 'name',
  title: 'My List',
  updateTitleText: true,
  getDetailCard:
    function(record, parent) {..}
});
Carousel
var car = new Ext.Carousel({
  direction: 'horizontal',
  indicator: true,
  items: [
    ..
  ]
});
Sheets
var sheet = new Ext.ActionSheet({
  items: [
    {
      text: 'Delete draft',
      ui: 'decline'
    }, {
      text: 'Save draft'
    }, {
      text: 'Cancel',
    }
  ]
});
sheet.show();
An Introduction to Sencha Touch
A Typical
Application
An Introduction to Sencha Touch
http://senchalearn.github.com/seattlebars/
APIs at work...
Location API to get lat/long

MongoLabs to get city name

Yelp to get businesses
https://github.com/
    senchalearn/
     seattlebars
Final Thoughts
Thick client, thin server


The shortfall in the cloud
Location Services
        Adaptation                         Analytics



   Web Fonts                                   Data Sync




Video Serving                                   Ad Serving


                                             $
       Image Serving                       Commerce
                        Network APIs
http://mysite.com/myimage.png




http://src.sencha.io/http://mysite.com/myimage.png
PhoneGap
A platform that allows you to package web applications
             and get access to device APIs




                 http://phonegap.com
+
built with

Apps vs Web technology
An Introduction to Sencha Touch
James Pearce
 Sr Director, Developer Relations

 @ jamespearce
   jamesp@sencha.com

More Related Content

An Introduction to Sencha Touch