Re: 0.9 ItemFileWriteStore converts object properties into arrays
2007-10-01 03:41:48 GMT
The simple answer to the concern (And sorry for the brevity, I'm back from a long trip and it's very late for me), Is that dojo.data is an API with a defined interface for accessing the attributes of an item regardless of how the service behind dojo.data returned the data. Therefore, internal structure the store uses to represent the item intended to be opaque by design. You shouldn't have to know or care about how the store keeps data internally. Stick to the API got getting and setting values and it shouldn't matter (store.getValue(item, attribute)). In the case of ItemFileStore, Sam is right, it normalizes the structure so accessing values for the store is simpler. Sincerely, -- Jared Jurkiewicz On 9/24/07, rishson <rishson <at> gmail.com> wrote: > > Thanks for the reply Sam. > I should have been clearer in my post as I am using the ItemFileWriteStore > as an API implementation of dojo.data. > myItemFileWriteStore.getItem(...) might return the selected item in its > original format ( not used that function to be honest), however, if you use > myItemFileWriteStore.fetch(...) you get the item(s) from the store that > match your fetch criteria, but reformatted as I mentioned previously. > > My issue with the store implementation is that the items you place in the > store are mutated (see original post). This forces client code to remember > if an item has come from a store and so is a poor separation of concerns. I > think that if a store implementation needs to do property conversion on an(Continue reading)

RSS Feed