1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    6
    Vote Rating
    0
    virtua is on a distinguished road

      0  

    Default Need an opinion - Zend ans Ext.Direct

    Need an opinion - Zend ans Ext.Direct


    Hello,

    After few days of digging in Google I need an opinion from seasoned Ext.Direct users.
    I'm starting new project: Zend Framemork on server-side, and extjs (MVC) on frontend. I don't know what is the best way to communicate both part:

    1. simply using urls, for example in Ajax request:
    Code:
    Ext.Ajax.request({
        url : 'my_controller/my_action',
        method: 'POST',
        params :{status : status},
        success: function ( response, request ) {
        }
    });
    but probably this is worst way

    2. using Ext.Direct to call controller / action

    3. using Ext.Direct to call Zend_Json_Server and services.

    Please, I really need help and opinion. I read tons of materials, but there wasn't simple information - what is proper / the best way to connect this to frameworks.

    Thank you all in advance.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,714
    Vote Rating
    438
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    If you are going to do Ext.Direct then you might as well go full Direct without using Ajax.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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

  3. #3
    Sencha User aw1zard2's Avatar
    Join Date
    Sep 2009
    Location
    Dallas, Texas
    Posts
    494
    Vote Rating
    4
    aw1zard2 is on a distinguished road

      0  

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    6
    Vote Rating
    0
    virtua is on a distinguished road

      0  

    Default Thank you.

    Thank you.


    You're fully right. But still it's not fully clear for me if I should create Zend_Json_Server, or call simply controller/action.

    Quote Originally Posted by mitchellsimoens View Post
    If you are going to do Ext.Direct then you might as well go full Direct without using Ajax.

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    6
    Vote Rating
    0
    virtua is on a distinguished road

      0  

    Default


    Thank you. It's very helpfull for pure php, but Zend Framework it's quite different way of thinking. I can use Zend_Json_Server and create services, but also I could use simple controllers and actions. As I can see in this post (http://www.sencha.com/forum/showthre...er-side-Stacks), in script for Symphony there is "controller / action" way. But I need to be sure, that this is also the best way for Zend Framework.

  6. #6
    Sencha User aw1zard2's Avatar
    Join Date
    Sep 2009
    Location
    Dallas, Texas
    Posts
    494
    Vote Rating
    4
    aw1zard2 is on a distinguished road

      0  

    Default


    Just use the search forum link.

    http://www.sencha.com/forum/showthre...l=1#post432753

    Even though that is a pure php Direct thread I posted earlier it gives a good example of how to use Direct.


  7. #7
    Sencha User aw1zard2's Avatar
    Join Date
    Sep 2009
    Location
    Dallas, Texas
    Posts
    494
    Vote Rating
    4
    aw1zard2 is on a distinguished road

      0  

    Default


    Having someone tell you which is best isn't the best case for your problem.
    People can give opinions but still you need to decide which would be best for the end result.

    For the things I've done using Ext JS its been a mix of best practices of other people.
    Some parts of my website it makes more sense to use Direct others not so much.

    Just make sure you are flexible enough for future additions as well. Don't lock yourself into one way of thinking.
    Since the web is always changing.