-
20 Aug 2010 3:13 PM #1
[OPEN-1226] Ext.data.Store and Ext.data.DataReader code and documentation issues
[OPEN-1226] Ext.data.Store and Ext.data.DataReader code and documentation issues
The DataReader class uses a 'meta' object instead of the standard ExtJS convention of a config object. The configuration options are not fully documented; DataReader references idProperty in the extractData function.
DataReader uses instanceof XmlReader/JsonReader in the extractData function that doesn't seem appropriate for an abstract parent class.
The ExtJS documentation for DataReader does not mention the read or readResponse methods that are used by HttpProxy when the Store data is read from a remote URL. This led to quite a bit of frustration and source code spelunking when attempting to create my own DataReader implementation and realizing that the documented functions are never called when loading data remotely.
This looks like a dark corner of the ExtJS code, so I wanted to shed some light on these issues while they were fresh in my mind. Thanks for the hard work producing a great library!
-
20 Aug 2010 10:34 PM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
These are known issues.
The fact that DataReader doesn't has a config object parameter in the constructor is for backward compatibility (can't be changed without breaking existing code).
The documentation for DataReader is indeed a bit sparse, but since DataReader is an abstract class that you won't instantiate, I don't see this as a big problem.
I completely agree about the instanceof. I would have made the property names configurable instead of hardcoding the descending classes.
In Ext 4 the complete data package will be rewritten and merged with Sencha Touch (which has the advantage that you can use a single server implementation and client side data configuration for both desktop and mobile development).
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[OPEN-432][3.??] Issue with Ext.data.DataReader realize method
By mlitcher in forum Ext 3.x: BugsReplies: 8Last Post: 20 Jun 2011, 6:59 AM -
[OPEN-1134] Ext.data.DataReader.realize() bug
By XASD in forum Ext 3.x: BugsReplies: 2Last Post: 19 Jul 2010, 2:01 AM -
Documentation for Ext.data.Store
By Devany in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 16 Apr 2007, 12:14 AM -
Documentation for Ext.data.Store
By sfwalter in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 3 Apr 2007, 9:23 AM -
any documentation available for the new Ext.data.Store ?
By neongrau in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 7 Mar 2007, 6:58 AM


Reply With Quote