Programmatic Metadata Navigation

May 9, 2011 at 7:17 PM

I'm working on a browser based OData service navigator that utilizes the information in the metadata to build a UI. I've found my self reimplementing some general metadata search functions you have in datajs but are not public in the API. Any plans on exposing functions such as 'lookupTypeInMetadata', 'lookupEntityType', etc. or creating other functions to help traverse the metadata programmatically? Being able to do things like get from a given entitySet to the associated entityType using something like Customers.entityType would be very nice.

May 10, 2011 at 1:13 AM

Jason, I think that exposing some of the metadata helpers might be OK - this is something we can definitely look into.

The Customers.entityType-style access is worthy of more discussion though. On one hand, I like the fact that it's a lot faster than doing look-ups continuously. On the other hand, I'm reluctant to modify the metadata that the page supplies to add these shortcuts, primarily because we don't think we "own" that data, and we'd have to come up with something to detect changes and react to them. Performance-wise, I intuitively would imagine it's not a big deal compared to the cost of doing HTTP request/responses most of the time which is involved in reading/writing data.

Thanks for bringing this up!