Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top