Hi,
I'm using REST starter kit to write a WPF client application which interact with RESTful web service implemented in Java using Glassfish v2.1 container.
I have tried different approaches for client side data usage as follow:
1. request only "one-level-deep" entity (for example customer) and only when properties of the customer are accessed retrieve the next level entity (for example customer type as sample of single entity, or list of orders of that customer as sample for list of entities).
2. request full-graph entity - for example when requesting that customer also get it's customer-type entity and also all of it's orders and their internal entity-graph.
There is no better way, there is more suitable way for specific need. When I need to use all the information the second way is much (much much) faster because the overhead of HTTP call, de-serialization and more are only done once.
The problem I saw is that REST starter kit sometime hang when large response returned from the web-service. By large I mean 5MB or response.
My question:
1. Is it bad to have such large response?
2. Does REST starter kit need to have all the answer before deserialization can occur?
3. What can be better way?
4. Currently I am using XML serialization, can JSON make a difference?
Thank you very much,
Ido.