PDA

View Full Version : how to build a project with alot of modules



mr.a
3 Jul 2013, 7:00 PM
My team is considering about refactoring our system with extjs4.x, now we have a problem. The old system is with ALOT of sub-pages loaded by the main-frame using iframe machanism, and it's really unpractical to load them all at once. How could I adopt the recommended MVC to this case, and how to load each module & it's resources when needed? thanks ~

slemmon
8 Jul 2013, 9:42 AM
It may make sense to have your application be the primarily the controller logic and core views needed to get the application started and for each complex view you use a loader config to ajax in the view's child items:
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.panel.Panel-cfg-loader

If you build your app for production using Sencha Cmd each required class will be compiled into a single JS file which will help when downloading multiple classes for a highly modularized application.

mr.a
19 Jul 2013, 1:32 AM
thanks alot~ it really works! but when it comes to compiling the whole project, I need a certain resource folder exported into the build path, what compile cmd should I use to achieve it?

thanks ~~