Results 1 to 3 of 3

Thread: Recommended Application Layout / Structure ExtJs4 and ExtJS 5 Hybrid

  1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    36

    Default Answered: Recommended Application Layout / Structure ExtJs4 and ExtJS 5 Hybrid

    Hi All

    I was wondering whether anyone could advise on the recommended application structure of an ExtJS 4 and ExtJS 5 "hybrid" application should be. By "hybrid", what I mean is that that the application was originally an Ext 4 application but has been upgraded to Ext JS 5 .

    In Ext JS 4, the recommended application layout was
    [PROJECT]
    --app
    ----view\
    ------myview\
    ---------MyView.js
    ----model\
    ----controller\
    ------myview\
    ---------MyViewController.js
    ----store\

    In Ext JS 5, it seems that this the recommended layout
    --app\
    ----view\
    ------MyView\
    --------MyView.js
    --------MyViewController.js
    --------MyViewModel.js
    ----model\
    ----store\

    Note that in the Ext 5 structure, there is no "controllers" dir.

    The question is If have a hybrid app, should any new views (i.e. MyView.js)be created under the view directory, the view model under a new dir (viewmodel/MyViewModel.js) and the ViewController created under the controller dir for hybrid apps therefore following the ExtJS 4 structure or should I depart from the Ext 4 structure and start using the ExtJS 5 structure for any new views. The reason I ask is that I am not sure whether my app will be broken by future releases if I followed the ExtJS 4 structure. I personally prefer the Ext JS 4 structure as it will mean that my app is uniformly structured but Im not sure what the implications will be for future releases

    Please advise

  2. The layout you have setup for Ext5 is correct.

    The difference in the controllers in that in Ext4, the controllers were global, where in Ext5 they are per the view and are loaded when the view is loaded.

    You can still have a controllers DIR for global controllers if needed.

  3. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    The layout you have setup for Ext5 is correct.

    The difference in the controllers in that in Ext4, the controllers were global, where in Ext5 they are per the view and are loaded when the view is loaded.

    You can still have a controllers DIR for global controllers if needed.

  4. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    36

    Default

    Thanks @scottmartin. I will follow the Ext 5 layout. Much appreciated

Tags for this Thread

Posting Permissions

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