What’s basic difference between JsonStore and JsonReader in context to Ext.data?
I mean when I should go for JsonStore and when I should use JsonReader as for me both are providing same solution.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Actually they are two separate things. A
Ext.data.JsonReaderreads a given JSON object and returns data records (Ext.data.Recordobjects) that are later stored by the respective data store.The
Ext.data.Storeis the base class for all Ext storages and uses helper objects for retrieving data (Ext.data.DataProxy), for writing data (Ext.data.DataWriter) and for reading data (Ext.data.DataReader). These base classes come in different flavors such as:Ext.data.DataProxy:Ext.data.DirectProxyExt.data.HttpProxyExt.data.MemoryProxyExt.data.ScriptTagProxyExt.data.DataWriterExt.data.JsonWriterExt.data.XmlWriterExt.data.DataReaderExt.data.JsonReaderExt.data.XmlReaderThis all builds up to a very extendable component that allows the developer to configure exactly what he needs to tweak. To make it easier for developers (especially new ones) Ext comes with some pre-configured data stores:
Ext.data.ArrayStoreto make reading from simple Javascript arrays easierExt.data.DirectStore, just a store preconfigured with anExt.data.DirectProxyand anExt.data.JsonReaderExt.data.JsonStore, just a store preconfigured with anExt.data.JsonReaderExt.data.XmlStore, just a store preconfigured with anExt.data.XmlReaderSo actually a
Ext.data.JsonStoreis just a convenience class to make it easier for the developer.The following two snippets will create the same (or comparable) stores: