Sencha Touch 2 Mobile JavaScript Framework

Sencha Touch 2 Mobile JavaScript Framework
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Learn to develop web applications that look and feel native on Apple iOS, Google Android, Blackberry 10, and Windows Mobile devices using simple examples
  • Design and control the look of your application using a variety of simple style settings and themes
  • Make your application respond to the user’s touch with events like tap, double tap, swipe, tap and hold, pinch, and rotate

Book Details

Language : English
Paperback : 324 pages [ 235mm x 191mm ]
Release Date : November 2013
ISBN : 1782160744
ISBN 13 : 9781782160748
Author(s) : John Earl Clark, Bryan P. Johnson
Topics and Technologies : All Books, Mobile Application Development, Open Source

Table of Contents

Chapter 1: Let's Begin with Sencha Touch
Chapter 2: Creating a Simple Application
Chapter 3: Styling the User Interface
Chapter 4: Components and Configurations
Chapter 5: Events and Controllers
Chapter 6: Getting the Data In
Chapter 7: Getting the Data Out
Chapter 8: Creating the Flickr Finder Application
Chapter 9: Advanced Topics
  • Chapter 1: Let's Begin with Sencha Touch
    • Frameworks
      • Building from a foundation
      • Building with a plan
      • Building with a community
    • Mobile application frameworks
      • Native application versus web application
      • Web-based mobile frameworks
      • Web frameworks and touch technology
    • Designing applications for mobile devices and touch technology
      • Why touch?
    • Getting started with Sencha Touch
      • The API
      • Examples
        • The Kitchen Sink application
      • Learn
      • Forums
    • Setting up your development environment
      • Setting up web sharing on Mac OS X
      • Installing a web server on Microsoft Windows
      • Download and install the Sencha Touch framework
    • Additional tools for developing with Sencha Touch
      • Safari and Chrome Developer Tools
        • JavaScript Console
        • The Network tab
        • The web inspector
        • The Resources tab
      • Other Sencha products
        • Sencha Cmd
        • Sencha Architect
        • Sencha Animator
      • Third-party developer tools
        • Notepad++
        • WebStorm
        • Xcode 5
        • Android Emulator
        • YUI test
        • Jasmine
        • JSLint
    • Summary
  • Chapter 2: Creating a Simple Application
    • Setting up the application
      • Getting started with Sencha Cmd
      • Creating the app.js file
      • Creating the Main.js file
      • Exploring the tab panel
        • Adding a panel
    • Controlling the look with layouts
      • Using a fit layout
      • Using a vbox layout
      • Using an hbox layout
    • Testing and debugging the application
      • Parse errors
      • Case sensitivity
      • Missing files
      • The web inspector console
    • Updating the application for production
    • Putting the application into production
    • Summary
  • Chapter 3: Styling the User Interface
    • Styling components versus themes
    • UI styling for toolbars and buttons
      • Adding the toolbar
      • Styling buttons
      • The tab bar
    • Sencha Touch themes
      • Introducing Sass and Compass
        • Variables in Sass
        • Mixins in Sass
        • Nesting in Sass
        • Selector inheritance in Sass
        • Compass
        • Sass + Compass = themes
    • Setting up Sass and Compass
      • Installing Ruby on Windows
    • Creating a custom theme
      • Base color
      • Mixins and the UI configuration
      • Adding new icons
      • Variables
      • More Sass resources
    • Default themes and theme switching
    • Images on multiple devices with Src
      • Specifying sizes with Src
        • Sizing by formula
        • Sizing by percentage
      • Changing file types
    • Summary
  • Chapter 4: Components and Configurations
    • The base component class
    • Taking another look at layouts
      • Creating a card layout
      • Creating an hbox layout
      • Creating a vbox layout
      • Creating a fit layout
      • Adding complexity
    • The TabPanel and Carousel components
      • Creating a TabPanel component
      • Creating a Carousel component
    • Creating a FormPanel component
      • Adding a DatePicker component
      • Adding sliders, spinners, and toggles
    • The MessageBox and Sheet components
      • Creating a MessageBox component
      • Creating a Sheet component
      • Creating an ActionSheet component
    • Creating a Map component
    • Creating lists
      • Adding grouped lists
      • Adding nested lists
    • Finding more information with the Sencha Docs
      • Finding a component
      • Understanding the component page
    • Summary
  • Chapter 5: Events and Controllers
    • Exploring events
      • Asynchronous versus synchronous actions
    • Adding listeners and handlers
    • Controllers
      • Refs and control
      • Referencing multiple items with ComponentQuery
    • Getting more out of events
      • Custom events
      • Exploring listener options
      • Taking a closer look at scope
      • Removing listeners
      • Using handlers and buttons
      • Exploring common events
    • Additional information on events
    • Summary
  • Chapter 6: Getting the Data In
    • Models
      • The basic model
      • Model validations
      • Model methods
      • Proxies and readers
    • Introducing data formats
      • Arrays
      • XML
      • JSON
      • JSONP
    • Introducing stores
      • A simple store
      • Forms and stores
        • Specialty text fields
      • Mapping fields to the model
      • Clearing the store data
      • Editing with forms
        • Switching handlers
    • Deleting from the data store
    • Summary
  • Chapter 7: Getting the Data Out
    • Using data stores for display
      • Directly binding a store
      • Sorters and filters
      • Paging a data store
      • Loading changes in a store
      • Data stores and panels
    • XTemplates
      • Manipulating data
      • Looping through data
        • Numbering within the loop
        • Parent data in the loop
      • Conditional display
      • Arithmetic functionality
      • Inline JavaScript
      • XTemplate member functions
        • The isEmpty function
      • Changing a panel's content with XTemplate.overwrite
    • Sencha Touch Charts
      • Installing Sencha Touch Charts
      • A simple pie chart
      • A bar chart
    • Summary
  • Chapter 8: Creating the Flickr Finder Application
    • Generating the basic application
    • Introducing the Model View Controller
      • Splitting up the pieces
    • Building the foundation with Sencha Cmd
      • Installing Sencha Cmd
      • Using the Flickr API
    • Adding to the basic application
      • Generating controllers with Sencha Cmd
      • A brief word about including files
      • Creating the Photo data model
    • Making the SearchPhotos components
      • Creating the SearchPhotos store
      • Creating the SearchPhotos list
      • Creating the Navigation view
      • Creating the SearchPhotoDetails view
      • Creating the SearchPhotos controller
        • Setting up the launch function
        • Using Ext.util.Geolocation
        • Listening to the list
    • Building the SavedPhotos components
      • Creating the SavedPhotos store
      • Creating the SavedPhoto views
      • Finishing up the Add button in SearchPhotos
      • Updating the SavedPhotos controller
    • Polishing your application
      • Adding application icons and startup screens
    • Improving the application
    • Summary
  • Chapter 9: Advanced Topics
    • Talking to your own server
      • Using your own API
      • REST
      • Designing your API
      • Creating the model and store
      • Making a request
      • Ajax requests in an API
    • Going offline
      • Syncing local and remote data
      • Manifests
      • Setting up your web server
        • Updating your cached application
      • Interface considerations
        • Alerting your users
        • Updating your UI
      • Alternate methods of detecting the offline mode
    • Getting into the marketplace
      • Compiling your application
        • Sencha Cmd
        • PhoneGap
        • Other options
      • Registering for developer accounts
        • Becoming an Apple developer
        • Becoming an Android developer
    • Summary

John Earl Clark

John Earl Clark holds a Master's degree in Human Computer Interaction from Georgia Tech and an undergraduate degree in Music Engineering from Georgia State University. He and his co-author, Bryan P. Johnson, worked together at MindSpring and, later, EarthLink; starting out in Technical Support and Documentation before moving into application development and, finally, the management of a small development team. After leaving EarthLink in 2002, John began working independently as a consultant and a programmer, before starting Twelve Foot Guru, LLC. with Bryan in 2005. He has been working with Sencha Touch since its first beta releases. He has also worked with Sencha's ExtJS since its early days when it was still known as YUI-Ext. He has also previously written a book with Bryan Johnson called Sencha Touch Mobile JavaScript Framework, Packt Publishing. When he is not buried in code, John spends his time woodworking, playing guitar, and brewing his own beer.

Bryan P. Johnson

Bryan P. Johnson is a graduate of the University of Georgia. He went to work for MindSpring Enterprises in late 1995, where he met his co-author John Earl Clark. At MindSpring and later, EarthLink; Bryan served in multiple positions for over seven years, including the Director of System Administration and Director of Internal Application Development. After leaving EarthLink, he took some time off to travel before joining John to start Twelve Foot Guru. Bryan has worked with Sencha's products since the early days of YUI-Ext and has used Sencha Touch since its first betas.

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Sencha Touch 2 Mobile JavaScript Framework +    Java EE 7 Developer Handbook =
50% Off
the second eBook
Price for both: £29.05

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Make use of technologies such as HTML5 and CSS3 to provide native-quality application experiences without the need for plugins
  • Create a sample application using Sencha Touch that will run on Apple iOS, Google Android, BlackBerry 10, and Windows Phone
  • Use the list of components available in the Sencha Touch framework libraries such as tab panels, scrollable list views, and toolbars
  • Add custom touch events such as tap, double tap, swipe, tap and hold, pinch, and rotate
  • Discover the rich event communication that is available in every Sencha Touch component, allowing you to quickly respond to your users and create intuitive, native quality applications
  • Control the look of your application with Sencha Touch themes and styling options
  • Put together simple components quickly, backed by the data package
  • Allow your users to store information with forms, or access remote information from other services like Google maps and Flickr

In Detail

Sencha Touch is a versatile HTML5-based framework for developing mobile web apps. Sencha Touch 2 has raised the bar for developing rich mobile web applications with HTML5. Using this framework you can develop mobile web apps that look and feel like native apps on iOS, Android, Blackberry, and Windows Mobile. It is built for enabling world-class user experiences.

"Sencha Touch 2 Mobile JavaScript Framework" is a step-by-step tutorial that will show you how to use Sencha Touch to produce attractive, exciting, native-quality, user friendly, easy-to-use mobile applications, that will keep your visitors coming back for more. There is sample code provided and explained with essential screenshots for better and quicker understanding.

"Sencha Touch 2 Mobile JavaScript Framework" will provide you with a hands-on approach to learning the language, taking you through the basic concepts and designs, to building a complete application from scratch.

We start with a foundation of JavaScript basics and work our way through the various components and features of Sencha Touch. We will explore how to leverage the Sencha Cmd utility to create applications quickly and cleanly. We will talk about how to get data in and out of your application, how to create new styles and themes, and even how to compile an application for sale on the various app stores.

"Sencha Touch 2 Mobile JavaScript Framework" will make you an expert application developer, using clear examples, code, and concepts.


Full of explained code and enriched with screenshots, this book is the practical way to take your Sencha Touch skills to the next level.

Who this book is for

If you want to gain practical knowledge for using the Sencha Touch mobile web application framework, and you are familiar with HTML and CSS, then this book is for you. It is assumed that you know how to use touchscreens, touch events, and mobile devices such as Apple iOS and Google Android.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software