I am quite new to Extjs and after going through some tutorials and blogs on Extjs MVC pattern, I am not clear as to how a complex app(say 10 - 15 page navigation) can be built on extjs platform.
From the sencha forums, it is suggested that all controllers need to be defined upfront in the app.js(because loading controllers before hand will not be a performance hit as compared to UI which loads DOM. Note that this was mentioned by a sencha forum manager).
Going by above approach, i have few questions:
when does a controller get instantiated ? Are they all loaded and instatiated when app loads and keep listening to events defined in them till lifetime of the app ?
What does defining Models[], Stores[] and Views[] within a controller class mean ? When do they get loaded and instantiated ?
How does navigation of pages work with controllers ? If navigation to a new page just translates to getParentContainer.remove(componentX) and getParentContainer.add(componentY), then the purpose of controllers is merely a file to handle events ?
Is there any scope (instantiation > destruction) with controllers ? If not how can multiple instances be created and destroyed so that my actions are not being listened to by wrong instance (i have seen some blogs that mention controllers are mostly singleton) ?
Can someone please throw some light on this ? Any examples / illustrations would be of great help.
Thanks