after generating a Workspace using Sencha Cmd and create Two different app, i just want to Run the first app and then after clicking a button,it calls the second app :) Like A main app calling another sub-app is there a way to do it ? thx for your help
相关问题
- How to dynamically load partial view Via jquery aj
- Sencha Touch Uncaught typeError: undefined is not
- How I'll create a model from json file? (ExtJS
- Decimal precision in an EXTJS grid
- How to add an Extra button on Extjs grid header me
相关文章
- Forward request from servlet to jsp
- superclass mismatch for class CommentsController (
- Sencha Ext.define Uses vs Requires
- play2 framework my template is not seen. : package
- Scrolling issues with ExtJS 5 app inside IFrame
- How to catch exception in flutter?
- Sencha Touch in WebView
- load different views into viewport
This topic has been brought up before. Check out suggestions here: Using more than one controller with ExtJS 4 MVC
You can develop separated modules that can work together with no problems. Both concepts are no in conflict at all.
Let me share my experience here. When we started in our current project (from the scratch) there were other two teams developing another two applications which after some time we should 'integrate' them in just one big app. You don´t have to be a genius to predict the ending result, right? Things got worse when we heard customer wanted more parallel work (more teams developing modules).
The first idea was using iframes but the PoC demonstrated it was a bad idea so, we stopped the machine and started designing a pluggable architecture. We did it well because currently we are able to load modules (we called it plugins) developed in an isolated way easily. For example, take a look at how our folder structure looks like:
And this is the metadata where we set the modules we want to load:
This has a lot of advantages:
Of course, this is not something extjs provides out of the box but you can do it because it worth.
So, short answer: your problem is not the application´s size but its struture instead. Follow the recommended MVC pattern with a custom folder structure as we do.
Update:
About the plugins metadata. The application main controller has only one responsability: load the plugins. This is done with this code:
And every plugin controller acts as a dispatcher, this is, there is a history component listening the url (in the address bar) and when it changes, iterates plugin by plugin asking for handle the url. The process ends when a plugin is able to handle the requested url.
This is the dispatcher configuration for the 'operations' plugins:
And This is the navigate method of the history class code:
One important point is plugins only have a reference to one shared component: the center area where they are rendered:
This reference is inherited by all the plugin controllers which are subclasses of a 'AbstractPluginController'. This is important because is the only thing modules know about their hoster. And this is why we can develop in parallel.
About the AbstractPluginController, this same class has some core functionalities useful for all the plugin controllers, for example, in order to load all theirs controllers/views/models when are required and not before that, this class implements the dynamic controllers loading as follow:
This allows us to specify the list of subcontrollers (because the main controllers is just an initializer and dispatch) the module has, and allows us to create them on demand.
Summarizing: I think the main points are these:
I hope this gives you an idea. There are lots of details an some tricks to integrate them but basically, what i want to show here is a modular application can be (or should be) developed with extjs with just a little of extra effort.