-
27 Oct 2011 7:03 AM #1
What is in 'sencha-touch.js'?
What is in 'sencha-touch.js'?
Trying to see what I can use as a simple demo for the 'sencha-touch.js' file. It seems even using the Ext.Loader I must use the 'sencha-touch-all.js'.
Or is the 'sencha-touch.js' the final file used after JBuilder that breaks down the components that is only used in the current app. If so, what are the components in the 'sencha-touch.js' that comes in the download?
-
27 Oct 2011 12:13 PM #2
I asked the same question last week and have yet to receive a response. In fact, many of my questions have not received a response -- probably because of SenchaCon. However, I hope that the Sencha team takes the time to go thru them and respond. ST 2.x is promising but we need assistance with it.
-
2 Nov 2011 10:39 AM #3Sencha - Sencha Touch Dev Team
- Join Date
- Jul 2009
- Location
- Palo Alto, California
- Posts
- 469
- Vote Rating
- 9
sencha-touch.js and sencha-touch-debug.js are both the core portions of the framework. The debug version is meant for development, the other one is for production.
sencha-touch-debug.js:
- is not minified
- has Ext.Loader enabled by default
- has pre-mappings of alternateClassNames / xtypes for all built-in classes in the framework for convenience during development.
Bottom line is you should include sencha-touch-debug.js during development, and switch to sencha-touch.js during production.Sencha Touch Lead Architect
-
7 Nov 2011 5:52 PM #4
Thanks but please explain the -all vs no -all versions.
-
7 Nov 2011 6:00 PM #5Sencha - Sencha Touch Dev Team
- Join Date
- Jul 2009
- Location
- Palo Alto, California
- Posts
- 469
- Vote Rating
- 9
while sencha-touch-all.js (sencha-touch-all-debug.js) is everything available in the framework combined. Two reasons why you shouldn't use them:
1. Unless your application uses most of everything we offer, it generally overkills in terms of file size and code execution performance. Production custom builds are always better.
2. sencha-touch-all-debug.js is huge (~70,000 lines) and it's very difficult to debug with debuggers, as compared to making use of Ext.Loader to have everything loaded and listed separated.Sencha Touch Lead Architect
-
7 Nov 2011 6:07 PM #6
What is in the core vs. not in the core? I understand that you should always use the minimal code necessary but how do I know that I'm using non-core functionality?
The way I see ST organized is: Base, Components, Views, Data, and Utilities. Not sure what is considered 'core'.
-
7 Nov 2011 6:12 PM #7Sencha - Sencha Touch Dev Team
- Join Date
- Jul 2009
- Location
- Palo Alto, California
- Posts
- 469
- Vote Rating
- 9
Core mainly consists of:
- The Class System
- The "lang" package (Ext.Function, Ext.Object, Ext.Array, etc...)
- Ext.Element
Any other classes you use are non-core, which means they are optional. The framework is designed to be loosely-coupledSencha Touch Lead Architect
-
8 Nov 2011 1:10 PM #8
Thanks for the update. So my goal is to get down to 'sencha-touch.js' once I learn the Loader part, if say I only wanted Panel, TabBar, and Button.
For now I will stick with the 'sencha-touch-all.js' until I get the Loader down


Reply With Quote