Results 1 to 7 of 7

Thread: Why i should use Ext Direct

  1. #1
    Sencha User
    Join Date
    Oct 2010
    Location
    Brazil - MG, Belo Horizonte
    Posts
    62
    Answers
    4

    Lightbulb Why i should use Ext Direct

    Hello guys, i'm starting to develop with Extjs, and i was thinking on use Ext Direct to make all the calls from the system. I had read a little about it, some content from Sencha, but i can't understand why shou be an nice idea use it on my project...

    Recently, i'm using Ajax calls... If someone could help me showing some good points... Thanks!

  2. #2
    Sencha Premium User vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    807
    Answers
    23

    Default

    less code, less maintenance, and less bugs, separation of logic, nice simplified client to server communication. No need to set request info like urls and other stuff, just call the method. Also is nice for polling an address periodically, I used it and liked very much.

  3. #3
    Sencha User
    Join Date
    Oct 2010
    Location
    Brazil - MG, Belo Horizonte
    Posts
    62
    Answers
    4

    Default

    Quote Originally Posted by vadimv View Post
    less code, less maintenance, and less bugs, separation of logic, nice simplified client to server communication. No need to set request info like urls and other stuff, just call the method. Also is nice for polling an address periodically, I used it and liked very much.
    Today i'm using Codeigniter at the server side (it is MVC based), and I think the Ext Direct not add anything in.
    Example:

    I have an class named Tasks, and it has an method getData(), that echoes on the browser the JSON Data stored on the database, with Ext Direct, i would need to set the Taks.getData() to get the JSON (i never tryed it, maybe i'm wrong), with pure PHP i would need to pass some variables to an page via POST or GET to specify what class and method i would need to access... This way, could be an terrible way.

    With Codeigniter, when an class are declared as Controller, you can acces each method from the url, so, my Task example task could be accessed like this:
    yoururl.com/Task/getMethod

    My problem to understand why use Ext Direct its because Codeigniter make access to methods through url's really easy, as Ext Direct.... Also, if i try Ext Direct, i will need to keep using Stores, so i can't see less code on it...

  4. #4
    Sencha Premium User vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    807
    Answers
    23

    Default

    I haven't used direct with stores, but looking at .DirectStore it seems that is almost just like any .Store, probably here "less code" is not so visible. I've used direct for ajax requests, and there was for sure less code.

  5. #5
    Sencha User
    Join Date
    Oct 2010
    Location
    Brazil - MG, Belo Horizonte
    Posts
    62
    Answers
    4

    Default

    Quote Originally Posted by vadimv View Post
    I haven't used direct with stores, but looking at .DirectStore it seems that is almost just like any .Store, probably here "less code" is not so visible. I've used direct for ajax requests, and there was for sure less code.
    Using Ext direct i don't need to create stores to work with the server data?

  6. #6
    Sencha Premium User vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    807
    Answers
    23

    Default

    for grids and dataviews you need stores.

  7. #7
    Sencha User
    Join Date
    Oct 2010
    Location
    Brazil - MG, Belo Horizonte
    Posts
    62
    Answers
    4

    Default

    Quote Originally Posted by vadimv View Post
    for grids and dataviews you need stores.
    I saw some examples using stores with checkboxes, it uses stores too with Ext Direct?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •