Dependencies not always loaded....
Originally Posted by Sottilde
I have noticed several things (using ext-debug.js):
When I load my app via browser and initial viewport loads, a number of dependencies are loaded.
But then, when I navigate to a different view (in my case a new tab in central tabpanel is opened that has a grid) a slew of other dependencies are being loaded on demand. But I think this goes to tell that if phantomJS is looking up Loader.history to figure out dependencies and you provide only initial view then it will not know about other ones (it cannot navigate to this other view magically).
The solutions are (as you indicated)
- to either provide all these dependencies in index-build.html
- use requires statements (ughhh...)
Neither, in my opinion is maintainable :)
Then I started thinking about what you said regarding including ext-all.js...
For a fairly complex app, why not just combine app's code with it and minify everything.
If you can say that app is using 75% of the framework and you decide to include ext-all.js, you would be making a trade-off between headeaches of dependency management and having few extra bytes being downloaded by clients (I have not checked, but I think extra 25% of framework your app is not using would not add a lot of overhead)
I am really considering this approach, but there is now another culprit....
How do I generate JSB3 file with a target that has only my apps files (and none of ext js ones)....:)
If I can do this in some automated fasion that would be great....
Can phantom js task that reads Ext.Loader.history generate 2 targets by filtering Ext dependencies and your Apps dependencies (I think it could becuase you have to give your app the namespace)