How to start the Sencha Touch app

I am very happy to learn Sencha Touch and improve my HTML5, CSS3, and JS skills to end up programming for all mobile platforms instead of focusing on single languages. But I am having trouble running.

Here is my question:

What is actually the minimum minimum required for an application?

This is why I am confused:

  • I started with a Hello World demo where they used 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 Neal didn't use it either!

Why are there so many different ways to start building a Sencha Touch app? How should I run my applications?

Thanks for setting me straight ahead

- Miles

+6
source share
1 answer

Ext.setup () is the minimum, I think. It just creates a page for a mobile device. In Intro to Panels (or at least the version 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 the Application object, which is required to use the various utility methods and methods that Sencha created.

In the API docs: “Sencha applications provide deep linking and history support in the application, allowing your users to use the back button inside your application and refresh the page and return to the same screen even after navigation. -App history support relies on the routing mechanism which displays the urls for controllers / 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'); 
+6
source

Source: https://habr.com/ru/post/892407/


All Articles