Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Start a Sencha Touch App

I'm excited to learn Sencha Touch and improve my HTML5, CSS3, and JS skills in order to eventually program for all mobile platforms instead of focusing on one-off languages. But I'm having trouble getting started.

Here's my question:

What is actually the bare minimum required for an application?

Here's why I'm confused:

  • I started with the Hello World demo where they use new Ext.Application()
  • Then I looked at Getting Started with Sencha Touch where they use Ext.setup()
  • Then I look at the Intro to Panels screencast where Drew Neil didn't use either!

Why do there seem to be so many different ways to start building a Sencha Touch app? How should I start my apps?

Thanks for setting me straight in advance,

-- Miles

like image 759
Miles Avatar asked Jul 09 '11 19:07

Miles


People also ask

Is Sencha Touch free?

Sencha Touch is available for free, and you may create an unlimited number of mobile applications with it.

Is Sencha Touch HTML framework?

Sencha Touch is a high-performance HTML5 mobile application framework. You can use Sencha Touch to produce a native-app-like experience inside a browser or in a hybrid shell. Sencha Touch supports Android, iOS, Windows Phone, Microsoft Surface Pro and RT, and BlackBerry devices.

What is Sencha Touch development?

Sencha Touch is a user interface (UI) JavaScript library, or web framework, specifically built for the Mobile Web. It can be used by Web developers to develop user interfaces for mobile web applications that look and feel like native applications on supported mobile devices.


1 Answers

Ext.setup() is the minimum, I think. It merely creates a page for a mobile device. In the Intro to Panels (or at least the version at http://vimeo.com/15879797), you can see Ext.setup() at 0:54 (?)

new Ext.Application() and Ext.regApplication(config) do what Ext.setup() does, but also create an Application object, which is required to take advantage of various utility methods and things Sencha has created.

From the API docs: "Sencha Applications provide in-app deep linking and history support, allowing your users both to use the back button inside your application and to refresh the page and come back to the same screen even after navigating. In-app history support relies on the Routing engine, which maps urls to controller/action pairs."

Creating an application also automatically registers a new namespace:

//this code is run internally automatically when creating the app
Ext.ns('MyApp', 'MyApp.views', 'MyApp.stores', 'MyApp.models', 'MyApp.controllers');
like image 106
Jonathan Packer Avatar answered Sep 27 '22 23:09

Jonathan Packer