views:

18

answers:

1

Hello. And thanks for any suggestions.

I am building a client facing web service, but am struggling with a design implementation.

For each of the service methods, an object is passed as a parameter IE: The CreateCustomer method accepts a Customer object.

The issue that I am having is with the response.

What I have currently in place is that (on success) the methods returned back to the Client the updated version of the submitted object.

IE: Customer CreateCustomer(Customer c)

The reason that I am doing this is so that the client will have the most up to date copy of the data, so that they can perform data integrity checks back on there side.

Question: Does this make sense? Do you also implement your method calls this way? Are there any fallbacks or reasons not to use this way? What other reasons would you want to do it this way?

Thanks, Steven

A: 

What about Optimistic concurrency ? Is your Object date accessible by more than 1 user ? if so How is it useful to use an object which might have changed by some other user say client B, while client A does some work or integrity checks with it.

Otherwise, feel no problem with it

Asad Butt