We use Ext JS MVC as an interface technology of the plugin / host architecture where one host exists and many plugins can be easily installed via xcopy. Each plugin has an Ext JS application, and each plugin registers on page load. Shared Application - Single Page Application (SPA) .
The main problem that we are facing now is that we have more than 10 plugins installed, and each plugin has at least 10 controllers and more than 50 representations, stores and models. Thus, when we refresh our page (F5), we should sit and wait for almost 30 seconds for something around 200 HTTP requests to reach the server, and something around 3 megabytes of response will return.
Although caching has been applied, it is completely undesirable. Even for the first time. I think that even a layman would agree with this argument that in order to get milk you should not wait until a farm, cows, barns, houses, roads, electricity, a river, etc. are built.
A definite answer to this problem should be lazy-loading controllers, views, stores and models. However, we do not have a clear picture of what we must do to get this, and we cannot find a good, applicable answer on the Internet. Most discussions relate only to the lazy-loading requirement, but they did not mention how to do this. Take a look at this link, for example:
http://www.sencha.com/forum/showthread.php?130449-Large-Single-Page-Architecture-in-ExtJS-4.0
or this one:
http://www.sencha.com/forum/archive/index.php/t-156694.html?s=aaeec1ce30acbc9cbd2615afadec982f
If we use the Ext.require method, then we simply load our controllers as simple JavaScript files and they will not be included in our hierarchy to load our stores, views and models. We tested it.
On the other hand, we cannot find getController() and ControllerManager on Ext JS. They seem to have remained on Ext JS 4.1.3.
Any idea on how we can dynamically load controllers based on URL parameters (we might need a routing mechanism to dynamically parse URLs and load managers). Even a well-documented article or forum discussion with sample code can help us.