PDA

View Full Version : How to change the folder structure of an Extjs project



pinidbest
4 Jan 2015, 7:25 AM
Hi, I am working with extjs for several years and wanted to know if the following can be applied.
Instead of working with the view controller model store folder structure
Is there a way to have the entire feature in a given folder, For example:

SomeFeature
------vuew
------controller
------model

and
SomeFeature2
------ vuew
------controller
------/model


the problem is the xtypes of chorse. When trying to work with them extjs tries to find them in the regular project structure


Thanks.

lumberjack
6 Jan 2015, 9:44 AM
As long as Sencha Cmd inspects the directory (which it will in this case) then your app will know what classes are in that setup and work just fine. There may be a bit of work if needing to use the controllers/stores/models configs in Ext.application (or a global controller).

An alternative approach might be to put your "modules" into separate Cmd packages (http://docs.sencha.com/cmd/5.x/cmd_packages/cmd_packages.html). This would allow you to re-use the code in other applications you may develop and allows the general application structure to remain intact (i.e. core application code would still use the controller/model/store/view directories).

Regards,
Brian

pinidbest
6 Jan 2015, 11:27 PM
I meant that working localy and debugging with dynamic loading and before the sencha cmd creates a minified versions or a concat version

Can this be done?

lumberjack
7 Jan 2015, 8:02 AM
My previous answer still applies.

Attached is a sample Ext JS 4.2.1.883 app structure that shows the rearrangement of the app directory, as well as the inclusion of a Cmd package. This structure is properly loaded in development mode when I test using the command below:


sencha app watch

Regards,
Brian

51454