PDA

View Full Version : large number of MVC elements in same Application (single page)



sekaijin
4 Jun 2012, 11:23 AM
Hello,
I have a project where I have a large number of different elements.
I have a TreeMenu in the west region.
for each choice in the menu, I open a TabPanel that contains the element Designed with MVC pattern.

my problem is that with all my MVC Controllers and Datastores are loaded by extjs before i need it.

the loading is very long even if the user opens a single element.

how to define subsets of MVC in each TabPanel that are loaded only as needed?

In the same vein I tried to use MVC for each "application" in the example desktop ext.

but again all applications are loaded at boot time ext office and not when the user opens them.

A + JYT

mitchellsimoens
26 Jun 2012, 8:28 AM
When you do a build for deployment all your classes will be built into a single file and will load faster.

sekaijin
8 Jul 2012, 1:49 AM
No!!!

a single file is slower when your application count a large number of modules

in intranet application download and interpret a verry large js file is slowest than
download and interpret single file for the application base and then if necesary
download the file of one module.

the download is one subject
but in MVC model of sencha ALL controllers are created on start up
then I ave more than 20 controllers.
If I use autoload in store of theres is more 40 stores that are loaded at start up.

If I defer the creatation of controller I can continue tu use autoload because the store are created when the controller start.

A+JYT