14 Sep 2012 4:48 AM #1
Unanswered: When Sencha build process is not the best approach
When ST2 beta was released, we migrated our solution to use that version.
At the end, we got a migrated application that runs in the browser, but fails with time-out when the app request the local index.html.
Using ST1, we have made a lot of improvements to our application, by adding an on-demand script loader, and lately, a programatic load with timeout (loads a js file each 2 seconds). By this way we got a faster startup, and each page is loaded on-demand, if it isn't already loaded.
In ST2 we saw that files are loaded on-demand also, but when build process minify all in a single app.js, the file size is too big, losing the advantage of that load. In the other hand, if we don't use the build process, the sdk files are huge also, and most of it isn't required .
So, I'd like to know if any of you can suggest a better way to build and get a ST2 (even ST 2.1) compiled.
Also, please suggest if it could be good to keep this kind of on-demand load, and also add all required components at app.js file, in order to minify and take only required SDK files. This is an idea that I will be trying soon
16 Sep 2012 4:22 PM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
With the way it happens in ST2, the first load will take longer but that app.js is saved in localstorage so any subsequent loads are lightening fast.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
20 Sep 2012 3:10 AM #3
Hi Mitchell, tks for your reply.
I see, but what if the request failed because timeout ?
My application is quite big, with several js files. I guessed that wouldn't be an issue, but in fact it was when we migrated the app to 2.0. Also I think that the approach that we are using to load js files at demand (similar to the dynamic load of ST2.0) is working fine, and I'd like to keep it working as it, no matter the build process of ST2.
So, is it fine to take the advantage of build process, in order to minimize the sdk size, but keep my js files apart, and load it dinamically ?
What are your feelings with big applications ? (FYI, our app has 118 js files, weighing 1MB approx, including sdk's, plugins, fwk's, etc.)