Sencha touch is a versatile HTML5-based framework for developing mobile web applications that look and feel native on touchscreen devices; with it, you can write your code once and deploy it to both iOS and Android, saving you both time and money.
The Sencha Touch Cookbook Second Edition has a comprehensive selection of recipes covering everything from installation right through to HTML5 geolocation.
This book really is your one-stop resource for cross-platform HTML5 application development. It covers the basics such as setting up an iOS, Android, and Blackberry development environment right through to much more complex development issues such as animation, rich media, geolocation, and device features. Every recipe is practically focused. Maximum action. Minimum theory.
Chapter 1, Gear Up for the Journey, covers the steps required to set up the environment to develop, deploy, and test Sencha Touch-based applications.
Chapter 2, Catering to Your Form-related Needs, explains how to create a form using Sencha Touch and the different form fields that can be used to work effectively with the forms.
Chapter 3, Containers and Layouts, covers all the layouts that the framework offers and how one can use them to structure their widgets on the screen.
Chapter 4, Building Custom Views, explains how one can create very custom-looking, data-driven, interactive view, and which classes need to be used for the same.
Chapter 5, Dealing with Data and Data Sources, covers every aspect of loading data from local or remote data sources, dealing with XML/JSON data, data translation, building client-side caches, and sharing the data across different UI components.
Chapter 6, Adding Components, covers components such as lists, buttons, the picker, action sheets, and tab panels. It also explains how to create new components or extend the existing ones.
Chapter 7, Adding Audio/Visual Appeal, covers how to work with audio and video components. Also, it covers the different charts that one can use to present data, visually, to the user.
Chapter 8, Taking Your Application Offline, introduces the concept of offline support and covers the steps that an application developer shall take to make their application work in online as well as offline mode.
Chapter 9, Increased Relevance Using Geolocation, covers how to get geolocation details inside the application and integrate it with Google Map.
Chapter 10, Device Integration, explains the different device features across different devices (for example, cameras, contacts, back button, and home button) and how one can integrate them inside the application to give a better user experience to the device user.
To run the samples, provided in the book, you need the following software:
Sun JDK Version 1.5 or above
Android Developer Tools (ADT) Bundled Eclipse
Apache Cordova 2.4.0
Apache Ant 1.8.4 or above
Sencha Touch 2.2.1 library
XCode 4
BlackBerry WebWorks SDK
This book is ideal for anyone who wants to gain the practical knowledge involved in using Sencha Touch mobile web application framework to make attractive web applications for mobile phones. If you have some familiarity with HTML and CSS, then this book is for you. This book will give designers the skills they need to implement their ideas and provide developers with creative inspiration through practical examples. It is assumed that you know how to use touchscreens, touch events, WebKit on mobile systems, Apple iOS, Google Android for mobile phones, and BlackBerry.
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text are shown as follows: "Create and open a new file ch01_05.js
in the ch01
folder and paste the following code in it."
A block of code is set as follows:
Ext.application({ name: 'MyApp', launch: function() {
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
Ext.application({
name: 'MyApp',
launch: function() {
Any command-line input or output is written as follows:
ant blackberry build
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Launch Xcode and go to Preferences."
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <[email protected]>
, and mention the book title via the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you. You can also find the code at: https://github.com/ajit-kumar-azad/SenchaTouch2Cookbook
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]>
if you are having a problem with any aspect of the book, and we will do our best to address it.