Sencha Touch Cookbook, Second Edition


Sencha Touch Cookbook, Second Edition
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
$25.49
save 15%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
$49.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
  • Learn every aspect of creating, building, packaging, and running a Sencha Touch application
  • Integrate your applications with different data sources and present them differently using list, data view, charts, and so on
  • Package your application with or without Cordova/PhoneGap and run them on a desktop, emulator, and a real mobile device

Book Details

Language : English
Paperback : 418 pages [ 235mm x 191mm ]
Release Date : August 2013
ISBN : 1782169180
ISBN 13 : 9781782169185
Author(s) : Ajit Kumar
Topics and Technologies : All Books, Mobile Application Development, Mobile, Cookbooks, Open Source


Table of Contents

Preface
Chapter 1: Gear Up for the Journey
Chapter 2: Catering to Your Form-related Needs
Chapter 3: Containers and Layouts
Chapter 4: Building Custom Views
Chapter 5: Dealing with Data and Data Sources
Chapter 6: Adding Components
Chapter 7: Adding Audio/Visual Appeal
Chapter 8: Taking Your Application Offline
Chapter 9: Increased Relevance Using Geolocation
Chapter 10: Device Integration
Index
  • Chapter 1: Gear Up for the Journey
    • Introduction
    • Setting up the Android-based development environment
    • Setting up the iOS-based development environment
    • Setting up the BlackBerry-based development environment
    • Setting up a browser-based development environment
    • Detecting the device
    • Finding features that are supported in the current environment
    • Letting your application configure itself using profiles
    • Responding to orientation changes
  • Chapter 2: Catering to Your Form-related Needs
    • Introduction
    • Getting your form ready with form panels
    • Working with the search field
    • Applying custom validation in the e-mail field
    • Working with dates using the date picker
    • Making a field hidden
    • Working with the select field
    • Changing a value using slider
    • Spinning the number wheel using spinner
    • Toggling between your two choices
    • Checkbox and checkbox groups
    • Text and text area
    • Grouping fields with fieldset
    • Validating your form
  • Chapter 3: Containers and Layouts
    • Introduction
    • Keeping your container lightweight
    • Working with Panel
    • Adding items to a container at runtime
    • Building wizards using CardLayout
    • Docking items
    • Fitting into the container using FitLayout
    • Arranging your items horizontally using HBoxLayout
    • Arranging your items vertically using VBoxLayout
    • Mixing layouts
    • Easing view navigation with the NavigationView class
  • Chapter 4: Building Custom Views
    • Introduction
    • Basic HTML templating using Template
    • Using XTemplate for advanced templating
    • Conditional view rendering using XTemplate
    • Designing custom views using DataView
    • Showing the filtered data
    • Responding to user actions
  • Chapter 5: Dealing with Data and Data Sources
    • Introduction
    • Creating a model
    • Loading the form using a data model
    • Working with a store
    • Converting incoming JSON data into a model using JsonReader
    • Converting incoming XML data into the model using XmlReader
    • Validations in models
    • Defining your custom validation
    • Relating models using association
    • Persisting session-specific data using the SessionStorage proxy
    • Persisting data using the LocalStorage proxy
    • Accessing in-memory data using the Memory proxy
    • Loading data through AJAX using the Ajax proxy
    • Sorting data
    • Data grouping
    • Filtering data
    • Using a cross-domain URL in your application
    • Working with Web SQL databases
  • Chapter 6: Adding Components
    • Introduction
    • Working with the button component
    • Creating a sheet of buttons with ActionSheet
    • Carousel
    • Managing a list of data using List
    • Grouping items in a list
    • Navigating through a list of data using IndexBar
    • Working with a list of nested data using NestedList
    • Picking up your choice using Picker
    • Switching between multiple views using SegmentedButton
    • Working with Tab panels
    • Getting quicker access to application features using Toolbar
    • Creating a new component
    • Extending an existing component's capability
    • Overriding a component's behavior
    • Adding behavior to an existing component using plugins
  • Chapter 7: Adding Audio/Visual Appeal
    • Introduction
    • Animating an element
    • Ding-dong! You have got a message
    • Working with videos
    • Creating your drawing
    • Working with an area chart
    • Working with a bar chart
    • Working with a column chart
    • Showing a group of bars and columns
    • Highlighting and displaying an item detail
    • Working with a gauge chart
    • Working with a line chart
    • Working with a pie chart
    • Rotating the pies
    • Highlighting a pie
    • Working with a 3D pie chart
    • Working with a radar chart
    • Working with a scatter chart
    • Working with a candlestick/OHLC chart
  • Chapter 8: Taking Your Application Offline
    • Introduction
    • Detecting offline mode
    • Storing your data offline in localstorage
    • Storing your data offline using Sencha.io
    • Storing your images offline
    • Application caching
  • Chapter 9: Increased Relevance Using Geolocation
    • Introduction
    • Finding out your location
    • Finding out the location using native device APIs
    • Auto update of your location
    • Tracking direction and speed
    • Hooking up Google Maps with your application
    • Working with the Google Maps options
    • Mapping Geolocation on Google Maps
  • Chapter 10: Device Integration
    • Introduction
    • Capturing and managing photos using a camera
    • Pulling out those contacts
    • Working with orientation
    • Managing notifications
    • Reading a file
    • Handling the home button on Android, iOS, and BlackBerry
    • Handling the back button on Android and BlackBerry
    • Handling the menu button on Android and Blackberry
    • Handling the search button on Android
    • Navigating using the BlackBerry trackpad

Ajit Kumar

Ajit Kumar started his IT career with Honeywell, Bangalore in the field of embedded systems and moved on to enterprise business applications (such as ERP) in his 13 years' career. From day one, he has been a staunch supporter and promoter of open source and believes strongly that open source is the way for a liberal, diversified, and democratic setup, such as India. He dreams, and continuously strives to ensure, that architecture, frameworks, and tools must facilitate software development at the speed of thought.

Ajit holds a Bachelor's degree in Computer Science and Engineering from the Bihar Institute of Technology, Sindri. He co-founded Walking Tree, which is based out of Hyderabad, India where he plays the role of CTO and works on fulfilling his vision.

Prior to writing this book, he worked on the following titles by Packt Publishing:

  • ADempiere 3.6 Cookbook
  • Sencha Touch Cookbook
  • Sencha MVC Architecture

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.


Errata

- 4 submitted: last submission 19 May 2014

Errata Type: Technical | Page No:  14

It is: Copy the  www  directory and located at  C:\sencha-touch-cookbook\softwares\touch-2.2.1 folder to the  assets directory and rename it to  touch.

It should be: Copy C:\sencha-touch-cookbook\softwares\ touch-2.2.1 folder to the  assets directory and rename it to  touch. 

Errata Type: Typo | Page No: 72

It is: For example,  Toolbar takes care of showing various buttons in the form of a toolbar and Media takes care of playing the audio/video.

It should be: For example, Toolbar takes care of showing various buttons in the form of a toolbar and tab.Panel takes care of showing mutiple tabs.

Errata type: Typo | Page no: 369

It is: If your application has been packaged using Sencha Cmd, which we will learn about in the next chapter, this implementation will be used.

It should be: If your application has been packaged using Sencha Cmd, this implementation will be used.

Errata type: Technical | Page no: 369

It is : In this recipe, we will see how to integrate with the Cordova API as Sencha does not provide the Cordova version of their Contact API, and you would not be able to get the contacts working if you packaged your application using Cordova.

It should be: In this recipe, we will see how to integrate with the Cordova API as Sencha does not provide the Cordova version of their Contact API, and you would not be able to get the contacts working if you packaged your application without using Cordova.

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 Cookbook, Second Edition +    Pig Design Patterns =
50% Off
the second eBook
Price for both: $43.05

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

What you will learn from this book

  • Set up your project for development, then build, package, and run it in a desktop browser, emulator, or a mobile device
  • Understand form panels and various form fields and their behaviour
  • Learn about different layouts to create well structured UI
  • Create complete custom views with user interaction
  • Work with different types of data and data sources, model them, and use them on components
  • Define new components and extend the framework components to suite your need
  • Get your application work in offline mode with automatic sync

In Detail

Sencha Touch is one of the most popular HTML5 and JavaScript frameworks for building touch-based mobile devices. Using Sencha Touch, you can create applications for touch mobile devices with ease, and once created, the same application works on multiple platforms – iOS, Android, Blackberry – without having to change anything.

Sencha Touch Cookbook, Second Edition is a practical, hands-on guide with easy to follow recipes that provide you with clear, step-by-step instructions, which will help you take complete advantage of the power of Sencha Touch 2 and will help you to build amazing applications for the mobile world.

Sencha Touch Cookbook, Second Edition starts by showing you how to set up your project for development, then walks through building, packaging, and running it in a browser, emulator, or a real device. With the groundwork set, the subsequent recipes of the book take you through the different UI components offered by the framework and explains how to use them, when to use them, and, if needed, how to extend them for your own application need.

You will also learn how to model your client side data, load data from different data sources, and use them on the data-centric UI components. The later parts of the book cover the practical day-to-day problems like how to create a custom view, how to take your application offline and support automatic sync, how to utilize the Geolocation to learn more about the user, how to utilize device features such as camera, contact, orientation, and how to link your application behaviour with the device buttons such as Back, Search, and so on. At the end, the book shows you how to create native packages without using PhoneGap/Cordova using Sencha Cmd.

Using this book, you will learn everything about using Sencha Touch classes and components to build mobile applications that can run across multiple platforms.

Approach

The book is written in a Cookbook style, presenting examples in the style of recipes, allowing you to go directly to your topic of interest or follow topics throughout a chapter to gain in-depth knowledge.

Who this book is for

Sencha Touch Cookbook, Second Edition is great for developers who are new to Sencha Touch and who are looking to get a good hold on what the Sencha Touch framework offers and how to use it to build a great touch-based mobile application running on different platforms. It is assumed that you will have some experience in HTML, CSS, DOM, and JavaScript. To truly appreciate the framework capability and take full advantage of the book, readers are expected to have one or more mobile devices.

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
Resources
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