PDA

View Full Version : [CLOSED] Ext JS 4.1 Store subclasses vs Ext.NET 2 Stores



anup
May 20, 2012, 8:13 PM
Hi,

As I understand it, Ext JS 4.x provides a (nicely) reworked data package. The Store comes with subclasses such as JsonStore, ArrayStore, and more. Looking at the documentation for Ext JS 4.1, the subclasses do not have any new methods/properties. Instead the code for each subclass seems quite small and just configures a specific reader for you automatically.

I looked at the Ext.NET 2 code and noticed it doesn't explicitly have its own subclasses of Store. I just want to understand why that is. Looking through your examples, it looks to me that if you wanted to use a JsonStore, it is the same as setting a JsonReader for the proxy that the storey is using. Same if you want to use other types of stores. But you do provide implementations of the various proxies, from the new client side ones (local storage etc) to the server side ones.

So, am I right in thinking that the need for Store subclasses in Ext.NET 2 isn't as important because you would need to pick the right reader, anyway?

I should probably explain that in the data chapter, so just want to make sure I get that right!

Thanks!

Vladimir
May 21, 2012, 11:39 AM
Well, Reader is used for on the client side therefore you can leave it as empty on the server side (store will be used default reader on the client side)
ArrayStore, JsonStore and XmlStore are store with preconfigured default type of reader, writer and proxy (ajax for xml and json)

We decided do not create multiple subclasses of store because it is easy to add AjaxProxy to Store if it is required. Url you need to specify in any way.
About Reader and Writer, it is also one string of code for Store (and Json reader is default)

Therefore those subclasess will not make your life more easy

anup
May 21, 2012, 3:21 PM
Makes sense. Thanks for confirming. You can mark this as closed.