18 Jan 2012 3:46 PM #1
need advice on large app
We are planning a large mcv sencha touch 2 app but need some advice on dynamic loading of models,stores and views.
Our app may have more than 100 views, stores and models consisting of lists,forms and html panels.
Can we load these files dynamically so our app is small on initial load and only loads what the user wants to use. No point loading over 200 files when the user just wants to fill out 1 form.
19 Jan 2012 7:04 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
So at the end of building an MVC app you should go through a build process with the SDK Tools that will build all your application classes and ST2 widgets into a single JS file. You will then load a CSS file, sencha-touch.js fie and app-all.js file. 100 classes isn't really that large, it's dependent how much code and how optimized you have made things that will be the factor.
Plus carrier signal is a huge part of it also. If they are slow then it doesn't really matter how you are loading things.Mitchell Simoens @LikelyMitch
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.
26 Jan 2012 3:46 AM #3
Not tried it myself, but came across it when reading through the Controllers guide in the docs:
If you are using routes (makes a lot of sense imho), then you can use "Before Filters" to load additional classes that are only needed for specific features (routes/urls).
26 Jan 2012 10:02 PM #4