-
3 Jun 2010 1:16 PM #1
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!
-
3 Jun 2010 3:22 PM #2
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!
-
4 Jun 2010 10:02 AM #3
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 Jun 2010 10:07 AM #4Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
Check out the source. You will see what Evan is talking 'bout.


Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
Similar Threads
-
store data from Store(Ext.data.JsonStore) in variable
By Roland D. in forum Ext 3.x: Help & DiscussionReplies: 3Last Post: 26 Apr 2010, 6:58 AM -
Difference between Ext.data.HttpProxy and Ext.data.DirectProxy in post data
By gdesjardins in forum Ext.DirectReplies: 0Last Post: 20 Apr 2010, 12:23 PM -
Differences between Ext.data.Store and Ext.data.JsonStore
By kirandasari in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 6 May 2009, 11:43 PM -
Ext.data.store works / Ext.data.JsonStore doesn't work
By phxx in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 28 Feb 2008, 10:14 AM -
What is the difference? Ext.data.Store
By franzisk in forum Ext 1.x: Help & DiscussionReplies: 3Last Post: 12 May 2007, 6:46 AM


Reply With Quote