I just wrote some hessian-based remote services in preparation for a 1.0
release. One of them has the following signature:
public com.foo.service.dto.UserInfoDto getUserInfo(String lanId)
I'm hesitant about using a rich UserInfoDto object though, with the
potential headaches of versioning it for multiple clients down the road
as it changes. i.e. If this goes out to 10 clients, and then I change
it, I can't feasibly force my clients to switch their client code at the
same time.
What options have others found successful and unsuccessful for this kind
of scenario? The alternatives I can think of are:
1. Return a Map filled with only the basic object types. This would
seem to allow workarounds for most of the versioning issues, but it's
not as intuitive or strongly typed.
2. Return an XML String. Similar to above, but it's not quite as
convenient for the client.
3. Version my client and service by package name. e.g.
com.foo.dto.service1_0.dto.UserInfoDto for the first release, and
com.foo.dto.service2_0.dto.UserInfoDto for the 2nd release.
Thanks for your thoughts,
Dan
Received on Wed 13 Jul 2005 07:47:06 -0700
This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:16:41 PDT