View Full Version : Sharing MVC Components between applications

8 Aug 2014, 9:58 AM
I have an application with a complicated grid panel component that I need to share in another application. Well... technically it's the same application but the grid needs to be exposed in a second browser window/panel.

Now in the past I've just copied blocks of code around and modified as necessary, but thought there ought to be a better way to share components between "apps" (or at least allow a single app to display components in a separate browser window without having the entire app duplicated).

Any thoughts from anyone?


10 Aug 2014, 9:08 AM
I'd suggest taking a look into creating a package for the component which you can share between the two application setups. This could be difficult if you haven't created the application with Sencha Cmd and Workspaces in the first place. There's some good guidance on packages here (http://docs.sencha.com/cmd/5.x/cmd_packages/cmd_creating_packages.html)As an alternative you could extract the component into an "Ext.ux" type namespace and maintain it in a separate repo.