Results 1 to 4 of 4

Thread: How to change the folder structure of an Extjs project

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    192
    Answers
    5

    Default How to change the folder structure of an Extjs project

    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.

  2. #2
    Sencha Premium User lumberjack's Avatar
    Join Date
    Nov 2014
    Location
    Kansas
    Posts
    781
    Answers
    102

    Default

    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. 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

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    192
    Answers
    5

    Default Not what I meant

    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?

  4. #4
    Sencha Premium User lumberjack's Avatar
    Join Date
    Nov 2014
    Location
    Kansas
    Posts
    781
    Answers
    102

    Default

    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:

    Code:
    sencha app watch
    Regards,
    Brian

    Modules.zip

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •