Creating Mobile Apps with Sencha Touch 2

Creating Mobile Apps with Sencha Touch 2
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Learn the Sencha Touch programming language by building real, working applications
  • Each chapter focuses on different features and programming approaches; you can decide which is right for you
  • Full of well-explained example code and rich with screenshots

Book Details

Language : English
Paperback : 348 pages [ 235mm x 191mm ]
Release Date : April 2013
ISBN : 1849518904
ISBN 13 : 9781849518901
Author(s) : John Earl Clark, Bryan P. Johnson
Topics and Technologies : All Books, Mobile Application Development, Android, iOS, Open Source

Table of Contents

Chapter 1: A Simple Task List
Chapter 2: A Feed Reader
Chapter 3: Going Command Line
Chapter 4: Weight Weight
Chapter 5: On Deck: Using
Chapter 6: Catalog Application and API
Chapter 7: The Decider: External APIs
Chapter 8: Evolver: Using Profiles
Chapter 9: Workbook: Using the Camera
Chapter 10: Game On
  • Chapter 1: A Simple Task List
    • A brief overview of Sencha Architect
      • The Toolbox
      • The help section
      • The design area
      • The Project Inspector area
      • The Config area
    • Getting started with the task list
      • Creating the data store
      • Adding a Model, Fields, and Field Types
      • Adding the model to the store
      • Making copies
      • Adding filters
    • Pay attention to the man behind the curtain
    • Architect versus coding by hand
    • Creating the views
      • Configuring the Tab Panel
      • Adding the lists and details
      • Setting up the templates
      • Testing with starter data
      • Adding the back button
    • Creating the forms
      • Add Task form
      • Editing and completing a task
      • Testing the application
    • Extra credit
    • Summary
    • Chapter 2: A Feed Reader
      • The basic application
        • An overview of NavigationView
        • Adding the form
        • Back to the navigation view
      • Adding the controller
      • Getting the data from a remote source
        • Enter the JSONP proxy
        • Yahoo Query Language (YQL)
          • The YQL console
        • Meanwhile, back at the controller
      • The details dataview
        • And now, the CSS
      • Homework
      • Summary
      • Chapter 3: Going Command Line
        • The basic application
          • Installing Sencha Cmd
          • Advantages of Sencha Cmd
          • Generating the application skeleton
          • Creating the TimeCop layout
          • Creating the theme
          • Creating the increment button
          • Creating the start button
        • Using native APIs with Ext.device
        • Testing and running native applications
          • Registering as a developer
          • Becoming an Apple developer
          • Provisioning an application
        • Meanwhile back in the code
          • Using the native notifications
        • Compiling the application
          • Setting up packager.json
        • Building native Android applications
          • Creating the Android signing certificate
          • Creating the Android configuration file
          • Compiling and launching the Android application
        • Summary
        • Chapter 4: Weight Weight
          • Sencha Charts overview
          • The basic application
            • Setting up the application and building the form
            • Creating the data entry form
            • Creating the AddTag view
            • Creating the config form
            • Creating the DataEntry controller
          • Defining the models and stores
            • Meanwhile, back in the controllers
              • Config.js
              • Getting started with Sencha Touch Charts
            • Creating the overview chart
              • Adding the axes
              • Creating the series
              • The interactions section
            • Creating the details view
              • Creating the goalChart view
              • Creating the word chart
          • Homework
          • Summary
          • Chapter 5: On Deck: Using
            • The basic application
              • Creating the models and stores
              • Creating the views
            • Getting started with
              • The sign-up process
              • Downloading and installing the SDK
              • Registering your application and Auth group
            • Updating the application for
              • Updating the stores
              • Creating the controller
              • Overriding the Carousel component
              • Back in the controller
            • Deploying the application
            • Homework
            • Summary
            • Chapter 6: Catalog Application and API
              • What is an API?
                • Using a remote API in Sencha Touch
                • Creating your own API
                  • Receiving data
                  • Communicating with the database
                  • Sending data back to the application
                  • More information on APIs
              • Building the basic application
                • Creating the item model
                  • RewriteRule and .htaccess
                • The item store
                • Creating the category model and store
                • Testing the store and the model
                • Creating the XTemplates
              • The API and the database
                • The GET request
                • The POST request
                • The PUT request
                • The DELETE request
                • The rest of the API
              • Summary
              • Chapter 7: The Decider: External APIs
                • Using an external API
                  • The API key
                  • API functions
                  • External APIs and Sencha Touch
                • The basic application
                  • Creating the categories list
                  • Creating the contact controller
                • Integrating with Google Maps and Foursquare
                  • Starting the mainView.js controller
                  • Creating the confirmLocation view
                  • Creating the Friends Chooser view
                  • Creating the restaurant list, store, and details
                    • Creating the restaurant store and model
                    • Creating the details view
                • Finishing the main view controller
                • Homework
                • Summary
                • Chapter 8: Evolver: Using Profiles
                  • An overview of profiles
                    • Profile basics
                    • Using profiles
                  • Creating the Evolver application
                    • About WordPress
                    • Using the plugin
                    • Setting up the profiles and app.js
                    • Setting up the models and stores
                    • Creating the views
                      • Creating the phone details view
                      • Creating the tablet details view
                    • The main views
                      • Creating the phone main view
                      • Creating the tablet main view
                    • Creating the controllers
                  • Conditional styling
                    • Media queries
                  • Summary
                  • Chapter 9: Workbook: Using the Camera
                    • Designing the basic application
                    • Creating the models and stores
                    • The views
                      • Creating the book views
                      • Adding the book list to the main view
                      • Starting the book controller
                      • Creating the note views
                    • Creating the controller
                    • Getting started with images
                      • Capturing an image
                      • Storing the image
                      • Displaying the image
                      • Sending images
                    • Summary
                    • Chapter 10: Game On
                      • Building the basic board
                        • Creating the square model
                        • Exploring itemTpl
                      • Creating the game controller
                        • Understanding basic controller functions
                      • The game board logic
                        • Starting a turn
                        • Checking the turn
                          • Checking if a move is legal
                        • Decorating the move
                        • Clearing the move
                      • Going beyond the finished game
                      • 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. John and his co-author, Bryan Johnson, worked together at MindSpring and later EarthLink, starting out in Technical Support and Documentation, before moving into Application Development and finally management of a small development team. After leaving Earthlink in 2002, John began working independently as a consultant and programmer, before starting Twelve Foot Guru, LLC with Bryan in 2005. John has been working with Sencha Touch since the first early beta releases. He has also worked with Sencha’s ExtJS since the early days when it was still known as YUI-Ext. John has also written a previous book with Bryan Johnson called Sencha Touch Mobile JavaScript Framework. 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.
                      Sorry, we don't have any reviews for this title yet.

                      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.


                      - 6 submitted: last submission 29 Oct 2013

                      Errata type: Code    Page No: 17

                      should be:

                      Errata type: Code    Page No: 24

                      should be:

                      Errata type: Code    Page No: 14

                      Save the new file you have opened as TaskList
                      should be:
                      Save the new file you have opened as TaskManager

                      Errata type: Code

                      On page 38, the sample code should read as follows:

                      var currentTab = this.getActiveItem();
                      var formPanel = currentTab.getActiveItem();
                      var values = formPanel.getValues();
                      var store ='TaskStore');
                      if( === null || === '') {
                      console.log('got NO ID');
                      var record = Ext.ModelMgr.create(values, 'MyApp.model.Task');
                      record.set('created', new Date());
                      } else {
                      console.log('got an ID');
                      var record = store.getById(;
                      record.set('description', values.description);
                      record.set('priority', values.priority);
                      This will catch both the previous empty value of null and the newer empty value of ''.


                      Errata Type: Code Page No: 30

                      The Setting up the templates section incorrectly lists the template configuration option as itemTpl when it should actually be just tpl (itemTpl was used in earlier versions).

                      Errata Type: Code Page No: 24

                      Setting up the templates

                      should be

                      We also need to add a store to each of our lists from the ones we created previously. In the config section for CurrentList set the store to TaskStore and in the config section for CompletedList set the store to CompletedStore.

                      Errata Type: Code  Page No: 35 to 39

                      "Add" button was created. But, there is no mention of event to load the form  
                      on tap. Here is how u do it -
                      1) Create a Tap event function on the add button
                      2) use the following code to load the add task form
                      console.log('Add Button Tapped..');
                      var currentTab = this.getActiveItem();

                      Errata Type: Code Page No: 31 and 32

             is not working. use the following instead -
                      new Date()

                      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

                      Creating Mobile Apps with Sencha Touch 2 +    Implementing Splunk: Big Data Reporting and Development for Operational Intelligence =
                      50% Off
                      the second eBook
                      Price for both: $39.00

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

                      What you will learn from this book

                      • Use Sencha Architect and Sencha Command to give you a head start with your projects
                      • Take advantage of cameras, notifications, and other native device features
                      • Create charts that will add visual appeal to your applications
                      • Tie your applications into other systems like WordPress, RSS feeds, Yelp and others
                      • Compile an application you can sell on the iTunes app store

                      In Detail

                      Everyone has had the perfect idea for a mobile application. Creating Mobile Apps with Sencha Touch 2 can help you bring that idea to life by providing clear examples, in depth explanations, and walking step-by-step building 10 different Sencha Touch mobile applications. You can use these applications as a base for your own applications or leverage your new skills to create something truly unique.

                      "Creating Mobile Apps with Sencha Touch 2" offers you 10 different applications complete with source code. The applications include a task manager, RSS feed reader, time tracker, charting application, flash cards, cataloguing, social networking, integration with WordPress, a project workbook, and a basic game. The book also covers working with the Sencha Architect,, and compiling applications with Sencha Command.

                      Learn the Sencha Touch mobile programming language by building 10 different applications. Each application focuses on a different feature of the Sencha Touch language.

                      Learn to build a range of applications for mobile devices. Take pictures with your application, create a simple game, or even create an application you can sell on the iTunes app store.

                      "Creating Mobile Apps with Sencha Touch 2" will help you learn by building, helping you create great applications.


                      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

                      This book is aimed at people who have a basic to intermediate understanding of Sencha Touch. If you understand the basic concepts, but you need to see how it all fits together, then this book is for you.

                      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