13 Feb 2012 8:19 AM #1
I was working to extend Ext.application from MVC to HMVC.
I show an example builded with HMVC architecture.
The application contains bundles, its has the same folder structure like application.
The bundle's controllers has the same application bus event.
The bundles have optional main view to be injected in application viewport (shell) by a defined placeholder. (I use Ext.ComponentQuery to view-discovery, view-injection).
13 Feb 2012 8:37 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
I would put this up on GitHub. People like me like to read code without downloading code.Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
13 Feb 2012 10:29 AM #3
21 Feb 2012 5:29 PM #4Perfection as a goal is a nice idea that can point one in a specific direction. However, since "perfection" is an ever changing (evolving?) and moving target, one must admit that perfection can never be obtained...
When in doubt, check the d4mn source code!
And here are my terms...
- I don't care if you use my source code. (Known as "Code.")
- I don't care if I get any monetary compensation.
- I do care to receive credit for Code provided. So, please keep my name in the comments for Code provided.
- Code is provided without warranty "AS-IS" and I claim absolutely no warranty nor liability to the quality, security, and run-ability on any platform.
- By using Code, you accept all risk inherit with Code regardless if Code has known and yet to be discovered bugs.
- You are welcome to change and improve the Code to best meet your needs.
- I don't care if you use the Code in a commercial or open-source project.
- You are not required to contact me prior to using the Code.
20 Apr 2012 6:34 AM #5
mandro, do you think that your good solution, would be possible to integrate with "ext.ux.desktop", using "desktop" like the main aplication ?¿
20 Apr 2012 7:16 AM #6
this solution is under any license ? (sorry about my english)
22 Jun 2012 11:02 AM #7
Thank you for your sample application. It is good inspiration for improving the framework.
A couple observations/questions:
* It does not appear that your app/module controllers support nested controllers, which means only 2 tiers are supported - the main & the module. For example, panelA is supervised by controllerA. PanelA contains a button to launch a different view (e.g. a config window). The sub-view should be supervised by a sub-controller. The pattern could continue to an Nth level. How would you refactor your example to support a nested design in order to avoid bloat in the main controller?
* When your app loads, new globals get added that correspond with each bundle. Seems like that approach could lead to namespace bloat & potential conflicts. Would it be better to keep all bundles isolated to the product namespace? For example, AM.Reverse, AM.Dashboard, and AM.Viewshed would be used instead.
27 Jun 2012 10:41 AM #8
Previously I developed a sample application to use other pattern in my solutions.
This solution only has 2 levels in depth, using MVC at level.
Now, I recently work in new simplified and improved solution to use HMVC, using components with MVC pattern at any level.
When I instanciate components, these create global namespaces, (I use the class Ext.ClassManager).But these meaning that you do not have 2 components with same name in a same level.
2 Jul 2012 7:30 AM #9
Sorry I could'nt submit these files at the github.