views:

237

answers:

3

There is ASMX, WCF, REST, and ADO.NET Data Services... I've used WCF and ASMX succesfully with Silverlight 2, but what about the others? What are the pros and cons of using each type of service with Silverlight 2?

+3  A: 

WCF is probably what you want, since it is a framework that includes http, soap, tcp, json, etc.

chills42
+1  A: 

You have multitude of options -

  1. RESTful webservice (if u need more than just CRUD) + ADO.net Data Service (Data)
  2. The Tried and tested ASMX
  3. Build an all in one WCF service that uses SOAP/HTTP/TCP/JSON/Your custome binding

Number 3 is my personal choice.

Perpetualcoder
+1  A: 

Depending on your intent a few things you must also take into consideration:

  1. RESTful web services are supported by ADO.NET Data Services as well as many other non-Microsoft platforms.

  2. WCF Web services must include a policy xml file and support more enhanced but Microsoft specific implementations of WS-* (WS "deathstar" if you want my opinion)

  3. ASMX web services are simple but lack the security model built around WCF (either RESTful or SOAP based).

If you want to do fast prototyping, I would recommend using ASMX services since they involve the least amount of effort. If you are doing something that involves a lot of database interaction, consider using ADO.NET Data Services and a RESTful approach. If you would like to add a lot of complexity, but benefit from more robust security and configuration, utilize WCF.

David in Dakota