1. #1
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    72
    Vote Rating
    7
    Wilky is on a distinguished road

      0  

    Default Ext.ux.Deferred

    Ext.ux.Deferred


    Hey guys!

    Today I'm gonna to present javascript promises for ExtJS and Sencha Touch!
    Hell yeah!
    Nowadays, lots of frameworks and libraries have implemented promises: ExtJS/Sencha Touch wont be less so!

    Here's the problem:

    Code:
    aSync1 (10, function (val1) {
      aSync2 (val1, function (val2) {
        aSync3 (val2, function (val3) {
          alert ('Top of the pyramid with: ', val3);         
          });     
        }); 
    });
    and here the solution:

    Code:
    aSync1 (10)     
        .then (aSync2)     
        .then (aSync3)     
        .then (function (val3) {         
          alert ('End of the queue with: ', val3);     
        }); 
    });
    This is only one of the extraordinary things that Ext.ux.Deferred allows you to do!
    For more examples, read the docs on the github page: https://github.com/wilk/Ext.ux.Deferred

    For class documentation, lunch jsduck

    Sencha Market: https://market.sencha.com/extensions/ext-ux-deferred

    Enjoy it!

    Ciao!
    Wilk
    Last edited by Wilky; 22 May 2013 at 11:22 PM. Reason: added sencha market link

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    872
    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


    Very nice work!
    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.

  3. #3
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    72
    Vote Rating
    7
    Wilky is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    Very nice work!
    Thanks

  4. #4
    Sencha Premium Member
    Join Date
    Jun 2008
    Posts
    324
    Vote Rating
    10
    Scorpie will become famous soon enough

      0  

    Default


    Is this modeled after Promises/A ?
    I`m from Holland!

  5. #5
    Ext Premium Member
    Join Date
    Aug 2010
    Posts
    12
    Vote Rating
    1
    dpatten69 is on a distinguished road

      0  

    Default


    Anybody using DeftJS promises/deferreds? how it compare, they implement the Promises/A spec.
    http://deftjs.org/

  6. #6
    Sencha Premium Member dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,083
    Vote Rating
    44
    dawesi has a spectacular aura about dawesi has a spectacular aura about

      1  

    Default


    For anyone who stumbles on this, promises are now in Sencha Touch 2.3 (and space)
    Teahouse Training Company
    Official Certified Sencha Trainer

    Australia / New Zealand / Singapore / Hong Kong & APAC



    SenchaWorld.com - Sencha webinars, videos, etc
    SenchaForge.org - (coming soon)
    TeahouseHQ.com - Sencha ecosystem training portal

    Code Validation : JSLint | JSONLint | JSONPLint

  7. #7
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    72
    Vote Rating
    7
    Wilky is on a distinguished road

      0  

    Default


    Good to hear it!