1
votes

Still not clear with this. I am testing with simple login form (Version is 2.2.1 and no external CSS or JS). After looking up the resource consuming, I am confused with js should i prefer either (sencha-touch.js or sencha-touch-all.js) for development and production. By default the microloader maps to sencha-touch.js. Should i change it?

sencha-touch.js --> enter image description here

sencha-touch-all.js --> enter image description here

Here it just give only 29 hits to server but downloading 4 mb of file which is larger than sencha-touch

1
sencha-touch.js has the bare minimum classes in it (no widgets, etc)... sencha-touch-all.js has everything in it. already mentioned in your quoted linkRaptor
Then why sencha-touch.js give 322 hits to server with basic app. This is my questionRED.Skull

1 Answers

1
votes

sencha-touch.js will be making a request to individual source files for each component your app requires in. sencha-toucha-all.js includes all components by default.

See this guide in the docs for more info: http://docs.sencha.com/touch/2.3.0/#!/guide/building

More specifically, this is what you should be doing: - use sencha-touch.js in development - have each of your files require in all the sencha touch components/proxies etc it needs - when you want to go to production, use the sencha app build command in your terminal to build to a single, minified javascript file which then contains all your code and all the sencha touch code your app needs.