1. #41
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,360
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    Quote Originally Posted by edspencer View Post

    You'd do:

    Code:
    Ext.define('MyApp.controller.Rah', {
        extend: 'Ext.data.Controller',
        
        config: {
            views: ['SomeView'],
            models: ['SomeModel'],
            stores: ['SomeStore']
        }
    });
    Right?
    That's precisely what I loved about PR1 - PR3 . That and the getView, getStore, getModel methods.

  2. #42
    Touch Premium Member
    Join Date
    Aug 2007
    Posts
    18
    Vote Rating
    0
    soros is on a distinguished road

      0  

    Default


    +1

    for the getView, getStore, getModel methods and
    Code:
    Ext.define('MyApp.controller.Rah', {
        extend: 'Ext.data.Controller',
        
        config: {
            views: ['SomeView'],
            models: ['SomeModel'],
            stores: ['SomeStore']
        }
    });

  3. #43
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    9
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Ok, I think I have Controllers pulling in additional dependencies with those configs now, seems to be working well enough but I'll keep testing.

    Just so we're clear though, those get*Model, get*View and get*Store functions are not going to be coming back, they're bad practice and too expensive. You're free to add them to your own Controllers of course...
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  4. #44
    Sencha User
    Join Date
    Aug 2011
    Location
    Cedar Rapids, IA
    Posts
    63
    Vote Rating
    1
    aoathout is on a distinguished road

      0  

    Default


    I personally prefer the 'requires:[]' better then the 'views/models/...' config options. It feels more like import/using statements and makes it pretty obvious what classes my component is using. Just my .02

  5. #45
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Quote Originally Posted by edspencer View Post
    Ok, I think I have Controllers pulling in additional dependencies with those configs now, seems to be working well enough but I'll keep testing.

    Just so we're clear though, those get*Model, get*View and get*Store functions are not going to be coming back, they're bad practice and too expensive. You're free to add them to your own Controllers of course...
    249px-White_flag_waving.svg.png

    Sencha Inc

    Jamie Avins

    @jamieavins

  6. #46
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,360
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    Quote Originally Posted by edspencer View Post
    Ok, I think I have Controllers pulling in additional dependencies with those configs now, seems to be working well enough but I'll keep testing.

    Just so we're clear though, those get*Model, get*View and get*Store functions are not going to be coming back, they're bad practice and too expensive. You're free to add them to your own Controllers of course...


  7. #47
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Omaha, NE
    Posts
    557
    Vote Rating
    25
    estesbubba will become famous soon enough estesbubba will become famous soon enough

      0  

    Default


    Quote Originally Posted by edspencer View Post
    Just so we're clear though, those get*Model, get*View and get*Store functions are not going to be coming back, they're bad practice and too expensive. You're free to add them to your own Controllers of course...
    I never liked those getters but thought I would be a good boy and follow the best practices. Then they got pulled out and I spent many tedious hours converting them to Ext.create's, so...

    KEEP 'EM DEAD

  8. #48
    Sencha User
    Join Date
    Aug 2011
    Location
    Cedar Rapids, IA
    Posts
    63
    Vote Rating
    1
    aoathout is on a distinguished road

      0  

    Default


    Quote Originally Posted by estesbubba View Post
    I never liked those getters but thought I would be a good boy and follow the best practices. Then they got pulled out and I spent many tedious hours converting them to Ext.create's, so...

    KEEP 'EM DEAD
    +100 on this