Web Services – Give more data rather than less…in moderation.

There are those that argue that XML is evil and bloated and blah, blah, blah. But if you’re building a web service, I find it’s always better to provide more information than less.

For example, you might be tempted to leave off stuff like dates/timestamps, etc. Don’t. Those little metadata tidbits come in handy. I always like saying “It’s already there.” whenever somebody asks me about that kind of stuff. (This is in sharp contrast to a certain web service I’m calling these days that returns a 1 or a 0. If there’s a failure, I have no indication as to the cause. If it’s successful, I don’t have any transaction number, etc. to refer to the call. Lame.)

Of course, if you’ve got performance issues or you need to save bandwidth, trim it back. Be reasonable.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: