1. #1
    Ext JS Premium Member
    Join Date
    May 2010
    Posts
    77
    Vote Rating
    0
    karthik085 is on a distinguished road

      0  

    Default Difference b/w Ext.data.JsonStore and Ext.data.Store

    Difference b/w Ext.data.JsonStore and Ext.data.Store


    Hi,
    I came across this article which explains the difference b/w Ext.data.JsonStore and Ext.data.Store, which I understand

    http://stackoverflow.com/questions/2130721/whats-basic-difference-between-jsonstore-and-jsonreader-in-context-to-ext-data


    As I am new to using ExtJS, what are the differences b/w them when it comes to
    a) favored way of retrieving JSON
    b) better coding standards
    c) any performance improvement of using one over the other

    Thanks!

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,943
    Vote Rating
    636
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    A JsonStore is just a convenience shortcut for creating a store with JsonReader and HttpProxy.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext User
    Join Date
    Aug 2009
    Posts
    588
    Vote Rating
    1
    Mike Robinson is on a distinguished road

      1  

    Default


    To think of it another way: "Store" is the ancestor object; "JsonStore" et al are descendants from that. All of these descendants implement the functionality of a "Store" but they do so in specific ways ... depending one exactly how your client and your server need to talk to one another.

    Going one optional step deeper in my explanation ... It so happens that, since most of the actual differences have to do with reading, writing, or encoding of data, many of the differences are implemented by specific "Reader," "Writer," and "Proxy" helper objects. The convenient, "canned" descendants of a Store deal with the task of instantiating and attaching the appropriate helpers to themselves, all behind-the-scenes from you.

    For what it's worth, very early on in developing apps around here, I devised a "company-specific Store object." It's precisely tuned to how we do things around here right now, but in all of the code that we are building around here, it's completely generic. The idea is that, when someone comes up with a blazingly new way of implementing the server-side, perhaps we'll only have to change one JavaScript file.

  4. #4
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    Check out the source. You will see what Evan is talking 'bout.

Similar Threads

  1. store data from Store(Ext.data.JsonStore) in variable
    By Roland D. in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 26 Apr 2010, 6:58 AM
  2. Replies: 0
    Last Post: 20 Apr 2010, 12:23 PM
  3. Differences between Ext.data.Store and Ext.data.JsonStore
    By kirandasari in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 6 May 2009, 11:43 PM
  4. Ext.data.store works / Ext.data.JsonStore doesn't work
    By phxx in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 28 Feb 2008, 10:14 AM
  5. What is the difference? Ext.data.Store
    By franzisk in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 12 May 2007, 6:46 AM

Thread Participants: 3