1. #1
    Ext JS Premium Member
    Join Date
    Jul 2009
    Posts
    5
    Vote Rating
    0
    KGeiger is on a distinguished road

      0  

    Default Understanding DirectStore and Proxy

    Understanding DirectStore and Proxy


    Hi All,

    I would appreciate any input. I have tested Evan's .Net Direct examples and Shibu's examples and I have been both working. However, I see that in Shibu's example he used DirectStore and I am trying to understand the purpose of DirectStore? What are some of the benefits, because I am thinking I could use a regular store why do I need to use a DirectStore? The other thing is I tried to use a DirectStore with Evan's example but for some reason it is not going into the function I specified using directFn in the config of the store and I tried this other configuration api: {load: <functionName> } but that still did not work. So in addition to trying to understand the pros and cons to DirectStore, I am also trying to understand the difference between using DirectProvider and DirectProxy that Shibu has included in his example (thinking that this maybe the source of my problem). I have also noticed that the ExtDirect Pack that we can download from extjs doesn't have DirectProxy and uses DirectProvider, which is fine, I am just trying to wrap my head around the differences and the pros and cons. I would appreciate any feedback.

    Thanks!

  2. #2
    Ext JS Premium Member
    Join Date
    Jul 2009
    Posts
    5
    Vote Rating
    0
    KGeiger is on a distinguished road

      0  

    Default


    Ok, I got the problem working now but I would still like to understand the benefits of using DirectStore vs any other store. The more I look at the code and try different things I believe the DirectProxy and the DirectProvider essentially does the same things just different ways of implementation.

  3. #3
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,270
    Vote Rating
    122
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    KGeiger -

    DirectStore is simply a convenience class of Ext.data.Store which predefines that you will be using a DirectProxy and a JsonReader. You could manually setup a plain old Ext.data.Store with a DirectProxy and a JsonReader and have exactly the same effect!

    Other convenience stores are:
    - ArrayStore - which assumes a MemoryProxy and an ArrayReader
    - JsonStore - which assumes an HttpProxy and a JsonReader
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  4. #4
    Ext JS Premium Member
    Join Date
    Jul 2009
    Posts
    5
    Vote Rating
    0
    KGeiger is on a distinguished road

      0  

    Default


    I see, it makes sense now! I just wanted to make sure I wasn't overlooking something significant. Thanks aconran.

  5. #5
    Sencha Complete Member
    Join Date
    Dec 2010
    Posts
    62
    Vote Rating
    2
    ALEITZ is on a distinguished road

      0  

    Default Looking for overview of Datastores, dataproxies and datareaders

    Looking for overview of Datastores, dataproxies and datareaders


    Hi,
    I am going to start by saying that I am impressed with ExtJS so far.

    That said the documentation around Datastores, dataproxies and datareaders is terribly lacking.
    What's the difference between a directproxy and a memoryproxy for example.
    When do I use a directstore or a jsonstore? The documentation in the samples and API Doc is insufficient. There's no overview of the datastore framework to provide guidance for someone trying to determine which components to use.

    Thanks

  6. #6
    Sencha User
    Join Date
    Feb 2011
    Posts
    28
    Vote Rating
    0
    optiplex is on a distinguished road

      0  

    Default


    I see, it makes judgement now! I retributive welcome to pretend certain I wasn't overlooking something big. Thanks aconran.
    The Game is Over

Thread Participants: 3