If you purchased this ebook directly from oreilly.com, you have the following benefits:
If you purchased this ebook from another retailer, you can upgrade your ebook to take advantage of all these benefits for just $4.99. to access your ebook upgrade.
Preface
The world of JavaScript frameworks is a ground in constant motion. New librariesand packages are published nearly every day, but as in any other market, only afew of them strive to attain a relatively large audience, reaching millions ofdownloads and, in some cases, some sort of cult following.
Sencha Touch is, without any doubt, one of the most talked-about of thoseframeworkssometimes loved, sometimes hated, but never ignored. Released tothe public in 2010 after two years in the making, it is in many respects themost advanced touchscreen-enabled JavaScript framework available today. It isalso a daunting platform, with an incredible amount of functionality baked in,covering almost every possible requirement in the process of developing mobileapplications.
This book hopes to provide a meaningful, simple path to approach the complexityencapsulated in this system, allowing developers to create mobile applicationsfor iOS, Android, and BlackBerry devices.
Intended Audience
This book is a general introduction to the Sencha Touch framework and platform,intended for mobile developers familiar with either iOS or Android who havean intermediate or advanced level of knowledge of JavaScript.
Structure of this Book
The book is structured as follows:
- , Getting Started, provides a complete overview of the framework. Developers who are in a hurry or who want to get down to the code can read this chapter to get a feeling of what the platform is capable of.
- , The Class System, starts with a discussion of the particular flavor of the model-view-controller (MVC) architecture used and enforced by Sencha Touch applications. It provides an introduction to the class definition and instantiation paradigm, and finally it contains an extensive review of low-level foundation code provided by the framework (data structures, algorithms, application programming interfaces [APIs], etc.)
- , Views, contains a description of the extensive library of visual components provided by Sencha Touch, including examples and sample code. It also discusses the approach required to create your own components from scratch.
- , Data, explains in detail how to define and use model classes in your applications, including a discussion of the whole infrastructure of stores, proxies, validations, and associations.
- , Forms, builds upon the previous two chapters to discuss in detail the creation and use of complex forms in applications, including a complete description of every type of form field available.
- , Controllers, provides the final elements of the Sencha Touch MVC architecture, explaining how to encapsulate business logic using controller objects, highlighting the benefits of this approach.
- , Styling Applications, explains how to use Sass to embellish and give a unique visual personality to applications, including a reference to the most important variables and elements that can be modified by application designers.
- , Debugging, Testing, and Documenting, shows how to increase the quality of Sencha Touch applications using tools such as the WebKit Web Inspector, Jasmine, Siesta, and JSDuck.
- , Sencha Architect, provides an introduction to this commercial tool that provides both an integrated development environment (IDE) and a visual application designer canvas, used for rapid application development.
- Finally, , Deployment in Devices, explains how to distribute Sencha Touch applications in production, either as HTML5 offline apps or as standalone native apps for iOS and Android, to be sold through the respective marketplaces of those platforms.
Code of the Book
You can download all the code samples of this book fromGithub. The projectcontains an installation script named install.sh
that will download all therequired libraries for the samples to run. The code of the book is distributedusing a liberal Berkeley Source Distribution (BSD) license, and will be updated to reflect anychanges and updates to Sencha Touch 2.x.
Note
Please be aware that the code samples are meant to be run from a web server, andnot just by double-clicking and opening the index.html
file in your browserdirectly. This is because Sencha Touch uses the XMLHTTPRequest
object, whichcannot be used when opening files using the file:///
protocol.
Conventions Used in This Book
The following typographical conventions are used in this book:
Italic Indicates new terms, URLs, email addresses, filenames, and file extensions. Constant width
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords. Constant width bold
Shows commands or other text that should be typed literally by the user. Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.
Tip
This icon signifies a tip, suggestion, or general note.
Warning
This icon indicates a warning or caution.
Using Code Examples
This book is here to help you get your job done. In general, if this book includes code examples, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless youre reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from OReilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your products documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: Sencha Touch 2 Up and Running by Adrian Kosmaczewski (OReilly). Copyright 2013 Adrian Kosmaczewski, 978-1-449-33938-8.
If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .
Safari Books Online
Note
Safari Books Online is an on-demand digital library that delivers expert content in both book and video form from the worlds leading authors in technology and business.