PhoneGap By Example
上QQ阅读APP看书,第一时间看更新

An introduction to Sencha Touch

In the previous chapter, I decided to select Sencha Touch as a framework for application development. It has been in existence for some years now and is popular among hybrid mobile application developers.

Sencha Touch is a product of Sencha company. It was first released on July 17, 2010. It was the 0.90 beta version. It was formed after other popular frameworks, such as Ext JS, jQTouch, and Raphael. At the time of writing this book, the latest version was 2.4.2.

It allows you to develop mobile applications that would have the same look and feel as a native application. Sencha Touch supports Android, iOS, Windows Phone, Microsoft Surface Pro and RT, and Blackberry devices.

Getting started with Sencha Touch isn't that difficult, but in order to get the best out of Sencha Touch, we need to invest a considerable amount of time in it.

To get a feel of a Sencha Touch app, take a look at the samples provided on its official page at http://www.sencha.com/products/touch/demos/.

You can also access its documentation on the official website at http://docs.sencha.com/touch/.

The main challenge in building a hybrid mobile application is performance optimization. In the PhoneGap development highlights section of Chapter 1, Installing and Configuring PhoneGap, we already mentioned the best practices to follow so that the application performs well. Sencha Touch helps us follow these practices by:

  • Organizing a single-page application
  • Creating the UI in JavaScript at the client side
  • Inserting/removing views into/from the DOM as needed
  • Avoiding network access
  • Caching static data
  • Caching dynamic data
  • Using CSS transitions and hardware acceleration
  • Using native scroll
  • Avoiding click event's 300 ms delay

We will look at these approaches once we install Sencha Touch.