views:

24

answers:

1

Hi Lords of the Interwebs,

I've got a Silverlight project that I'm just beginning and I thought I would pick your brains a bit. I'm deciding on a data model to communicate from server to Silverlight client. My boss made the comment that he might want that data model to evolve into API's that could be used by various clients in the future. Thus my scope isn't limited to just Silverlight now. So I was wondering, what would you suggest? Here is how I see it.

  • asmx web services (greater compatibility with Java clients) https and basic auth
  • POS or JSON via REST secured by https and some sort of password scheme
  • WCF Services (ok but are they really 100% Java client compatible? Not most clients DO NOT use the latest version of AXIS from my experience either)
  • WCF RIA Services (not sure about compatibility, our data model frequently changes)
  • POCO w WCF (not sure about compatibility)
  • Heck even binary serialization and tcp/ip (can .Net and other languages play together?)
  • OData? I don't know much about this.

As I see it I'm currently leaning towards asmx or WCF using SOAP 1.1. I've ran into incompatibility issues before with Java/Axis clients but I worked through them. However if it were up to me is seems like a much less complex way to go would be a REST JSON based https API. I played around with Silverlight and Twitter and was able to consume some of the Twitter API's in JSON. Not sure https / password basic or header auth is considered secure enough.

What are your thoughts? Thank you very much for any input you can give me.

+1  A: 

If your goals are (1) a great experience for the Silverlight client and (2) interop with non-Silverlight, clients, I would definitely go with WCF. With WCF, you can put several bindings on the same service (e.g. SOAP1.2 + Binary XML for Silverlight, plain vanilla SOAP1.1 for Java clients, etc)

Shameless plug for my own talks on the subject, old but still relevant:

http://archive.visitmix.com/blogs/2008Sessions/T13/

http://videos.visitmix.com/MIX09/T42F

Eugene Osovetsky
That was a good answer, thank you!
infocyde