1. #1
    Ext JS Premium Member anton.dimitrov's Avatar
    Join Date
    Nov 2011
    Location
    The Netherlands
    Posts
    128
    Vote Rating
    5
    anton.dimitrov is on a distinguished road

      0  

    Default Advice on Migrating to Sencha Cmd

    Advice on Migrating to Sencha Cmd


    I am migrating an existing ExtJS 4 (4.1.3) app to use Sencha Cmd (GA).
    The app is a single page app and uses a custom structure. I red all the guides for Sencha Cmd and
    managed to migrate the app structure and produce a custom build for our app.
    This is the test script we use to build all application files (excluding ext files).
    Code:
    sencha compile --classpath=lib/extjs/src,js ^
        --debug=true ^
        exclude -not -namespace Fms and ^
        save AppOnly and ^
        concat build/fms-all-debug.js and ^
        --debug=false ^
        restore AppOnly and ^
        concat -yui build/fms-all.js
    This is the filder structure of the app JS folder

    Code:
    - js (folder)
      - app (folder)
        app.js (Ext.application();)
    The build runs smoothly without errors, but the result is a bit strange. When I examine the debug build I see that the content of app.js is being placed somewhere in the middle of the build.

    this is the result:
    Code:
    ...class definitions...
    
    Ext.application({...});
    
    ...more class definitions
    This causes the app to request all files defined after the 'Ext.application' (I have Ext.Loader turned on for test purposes ).
    Is it possible to enforce the file app.js to be appended to the build after the build process ?
    I tried excluding the file from the build but then I don't know how to append it afterwards.

    Any help is appreciated.

  2. #2
    Ext JS Premium Member anton.dimitrov's Avatar
    Join Date
    Nov 2011
    Location
    The Netherlands
    Posts
    128
    Vote Rating
    5
    anton.dimitrov is on a distinguished road

      0  

    Default


    It seems that all views, stores, and models declared in the controllers don't get loaded prior to the definition of the controller.

    Code:
    requires: [
     'MyApp.SomeClass'   <- this will be loaded prior to the controller
    ],
    
    // these declarations do not get loaded......
    stores: [
     'MyStore'
    ],
    views: [
     'MyView'
    ],
    models: [
     'MyModel'
    ]

    I found that there was a bug connected with this but was supposed to be fixed with Sencha Cmd GA
    http://www.sencha.com/forum/showthre...s-load-problem

  3. #3
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,294
    Vote Rating
    121
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    Can you post the relevant pieces of your Ext.application call and a Controller that is not having its dependencies respected?
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  4. #4
    Ext JS Premium Member anton.dimitrov's Avatar
    Join Date
    Nov 2011
    Location
    The Netherlands
    Posts
    128
    Vote Rating
    5
    anton.dimitrov is on a distinguished road

      0  

    Default


    Thank you for the replay.

    After revising the benefits of migrating to the new front-end structure required by Sencha Cmd we decided that It might be beneficial for us after all. I produced dummy app with the same namespace and migrated our front-end structure to support sencha build command.

    The build process works now. The views, stores and models are loaded before the controller - just like they should.

    I don't know what was causing the problem before, but migrating to the new structure was not that difficult. I would recommend everybody to do that because it will save a lot of time in the deployment process.

    10x

Thread Participants: 1

Tags for this Thread