27 Oct 2011 7:03 AM #1
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
2 Nov 2011 10:39 AM #3
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.
- 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 #5
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 #7
Core mainly consists of:
- The Class System
- The "lang" package (Ext.Function, Ext.Object, Ext.Array, etc...)
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