1. #1
    Sencha User
    Join Date
    Sep 2011
    Location
    China
    Posts
    8
    Vote Rating
    0
    losingrose is on a distinguished road

      0  

    Smile How to use Ext.dispatch( ) in Touch 2.x or an action controller

    How to use Ext.dispatch( ) in Touch 2.x or an action controller


    I hope the controller of Touch 1.x will be realized in Touch 2.x .
    But now I'm very disappointed that the controller of Touch 2.x was made like Extjs 4.x .
    The controller should be like an container with many of actions in mvc.In views we can call any action in events.It's the true MVC Framework like in touch 1.x .
    In Touch 2.x and Extjs 4.0 the controller is without any action and was designed to be a listeners manager of the view.I can not understand the mean of this design.It will cause the controller is limited by the view design.

    My English is not so good, bear with me a lot.I want that Ext.dispatch() and action controller will be realized in Touch 2.x .

  2. #2
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    There is a lot of work being done with MVC before the GA release of Sencha Touch 2. Bare with us.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    2
    Vote Rating
    0
    TruMan1 is on a distinguished road

      0  

    Default


    Anything we can use in PR3? I don't see how MVC can work properly without this.

  4. #4
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    None of the work being done on MVC has made it into any of the Preview Releases. It will however be in for final release.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  5. #5
    Sencha User
    Join Date
    Dec 2011
    Posts
    2
    Vote Rating
    0
    TruMan1 is on a distinguished road

      0  

    Default


    That is heartbreaking . I urge you to reconsider. We would love to test and provide feedback on the MVC implementation even if it is not set in stone. Besides, how are we supposed to put Touch 2 through real world testing if there is no way for us to build up our own architecture.

  6. #6
    Sencha User
    Join Date
    Jun 2010
    Location
    India
    Posts
    17
    Vote Rating
    0
    ideamonk is on a distinguished road

      0  

    Default


    The way to MVC is pretty unclear right now. I couldn't get Ext.dispatch working. Though after study of examples, I figured out that this.getController('App.controller.Foo') loads up /App/controller/Foo.js

    So the show could be called up from a main controller as this.getController('App.controller.Foo').show()

    I switched from PR2 to PR3 recently. I'm doing my current development on preview releases so as to have minimum friction when ST2 comes out. But I hope architecture guesswork from examples would hold in final release too.

    My app has this structure -

    20111213-r23i4nb3yjy5yawdxre8juqqgm.jpg

    I've grown pretty comfortable to this!

  7. #7
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    @TruMan1

    Sorry, I cam across wrong. It will make it into one of the releases before the final.

    @ideamonk

    The structure won't change much at all, and structures like that should still work in the 2.0 final.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  8. #8
    Sencha User
    Join Date
    Nov 2011
    Location
    Toronto
    Posts
    105
    Vote Rating
    2
    basememara is on a distinguished road

      0  

    Default


    Quote Originally Posted by ideamonk View Post
    The way to MVC is pretty unclear right now. I couldn't get Ext.dispatch working. Though after study of examples, I figured out that this.getController('App.controller.Foo') loads up /App/controller/Foo.js

    So the show could be called up from a main controller as this.getController('App.controller.Foo').show()

    I switched from PR2 to PR3 recently. I'm doing my current development on preview releases so as to have minimum friction when ST2 comes out. But I hope architecture guesswork from examples would hold in final release too.
    That is good stuff! But how do you get your actions to render your views and pass the values to it?

  9. #9
    Sencha User
    Join Date
    Jun 2010
    Location
    India
    Posts
    17
    Vote Rating
    0
    ideamonk is on a distinguished road

      0  

    Default


    My main view, or the viewport is a NavigationView and actually in every controller's show method, I'm getting the main view, via the refs system, and doing a push.

    E.g. show of the Menu controller -
    Code:
    show: function() {
        this.getMain().push( this.getMenuView() );
    }
    and refs look like this -
    Code:
     refs: [
            {
                ref : 'main',
                selector: '#mainView',
            },
            {
                ref: 'menuView',
                selector : 'menuView'
            },
    ]
    My Main view is loading up every other view via requires: [ ... ], and has every view used in the app inside its items.

    For passing values, lets say while I've to reveal a menu item, the show method of details view should have an id parameter. The details view would do appropriate data store calls, place in loading spinner, and remove when data comes in. The controls like list that are bound to data store would get rendered automatically, while if I've some other complex components, I could target them via refs and change them from controller.

  10. #10
    Sencha User
    Join Date
    Nov 2011
    Location
    Toronto
    Posts
    105
    Vote Rating
    2
    basememara is on a distinguished road

      0  

    Default


    Thanks for the help @ideamonk. I just posted a blog article regarding MVC and Touch 2. I hope it helps someone:
    http://blog.falafel.com/blogs/baseme...2_and_MVC.aspx

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar