1. #1
    Sencha User
    Join Date
    Aug 2013
    Posts
    62
    Answers
    1
    Vote Rating
    0
    kumar_Rajesh78 is on a distinguished road

      0  

    Default Answered: Which Class Structure to follow in Extjs5 - Help Needed.

    Answered: Which Class Structure to follow in Extjs5 - Help Needed.


    Hi Team,
    I am planning to migrate my application from extjs 4 to 5. This is the way I have structured my Models, view and controller.
    Sencha.png
    However, as per the extjs 5 documentation, it recommends using the following structure..
    Untitled.png

    My question is which structure shall I follow. Can I keep my old structure of code in place with Ext JS 5 or I will have to have these files. Main.js, MainController.js, MainModel.js. I did not have these files with ExtJs4.

    Appreciate your input and thanks in advance.
    Last edited by kumar_Rajesh78; 13 Jun 2014 at 8:48 AM. Reason: Changed the Title

  2. MVC that was in Ext 4 will work the same in Ext 5 so if you don't want to use view controllers then you don't have to, you can stick with global controllers.

    It's not going to be as easy as just replacing Ext, there are some changes. Most are documented in the upgrade guide but you should expect some changes going from one major version to another but we have tried hard to make the changes small.

  3. #2
    Sencha User
    Join Date
    Aug 2013
    Posts
    34
    Vote Rating
    0
    rajuarien is on a distinguished road

      0  

    Default


    Hi Rajesh, Had a query just trying to POC EXTJS 5. i installed the trial version of EXT JS 5.X. I could find the ext.all.js file but where are the css files ? i dont want to be running the Sencha Cmd it should be as simple as including a JS/CSS file like other Third party components.

  4. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Answers
    3541
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    @kumar_Rajesh78 I think you are confusing terms.

    In Ext JS 4 we put controllers in the app/controller/ directory. In Ext JS 5 you can still do that with global controllers but the new ViewControllers should go next to the associated view. So I think you are confusing global controllers with view controllers.

    The same thing with the Ext.data.Model that are placed in app/model/ versus the view model. These are completely different things. Ext.data.Model is for holding data, a view model is for binding data.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Answers
    3541
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      1  

    Default


    Quote Originally Posted by rajuarien View Post
    Hi Rajesh, Had a query just trying to POC EXTJS 5. i installed the trial version of EXT JS 5.X. I could find the ext.all.js file but where are the css files ? i dont want to be running the Sencha Cmd it should be as simple as including a JS/CSS file like other Third party components.
    The CSS are in the build/packages/ext-theme-*/build/resources/*.css
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  6. #5
    Sencha User
    Join Date
    Aug 2013
    Posts
    62
    Answers
    1
    Vote Rating
    0
    kumar_Rajesh78 is on a distinguished road

      0  

    Default Which Class Structure to follow in Extjs5 - Help Needed.

    Which Class Structure to follow in Extjs5 - Help Needed.


    Thanks for the answer Mitchell,
    So does it mean that, if I don't need to use View Controllers and View Models for my application that I am going to write in ExtJS5, I can still use the same old structure for model, view and controllers that I used in version 4, without changing a lot of things.

    Also, does it mean that I can simply switch to extjs5 with the code that I am writing in extjs4, If dont need to use features provided in 5. I understand 5 is offering a lot more features than 4, but I have a small application with very less functionality.

    Thanks a lot in advance.

  7. #6
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Answers
    3541
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    MVC that was in Ext 4 will work the same in Ext 5 so if you don't want to use view controllers then you don't have to, you can stick with global controllers.

    It's not going to be as easy as just replacing Ext, there are some changes. Most are documented in the upgrade guide but you should expect some changes going from one major version to another but we have tried hard to make the changes small.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  8. #7
    Sencha User
    Join Date
    Aug 2013
    Posts
    62
    Answers
    1
    Vote Rating
    0
    kumar_Rajesh78 is on a distinguished road

      0  

    Default Which Class Structure to follow in Extjs5 - Help Needed.

    Which Class Structure to follow in Extjs5 - Help Needed.


    Thanks Mitchell,
    Your explanations make complete sense to me.

    Really appreciate your time!!

    Rajesh

Thread Participants: 2