which web service technology to use?

Ali El

New member
Apr 3, 2014
83
0
0
Visit site
I'm going to be creating a web service for a project I'm going to start soon, and I am curious which web service you think is best; SOAP, REST or WCF (do correct me if I'm getting this wrong). If you're wondering what its going to be used for, mostly database interactions, and will be targeting universal apps.

Your feedback would be best.
 

drachen23

New member
Nov 5, 2011
86
0
0
Visit site
Create a REST endpoint. For some reason MS doesn't support System.ServiceModel in Universal/WinRT projects yet. You will have to call the endpoint with HttpClient yourself instead of having VS make you a service wrapper class to call.
 

Ali El

New member
Apr 3, 2014
83
0
0
Visit site
I did a lot of reading and web service web api, rest and soap. This is drawing me confusion. So some say that if I am building two apps that will explicitly speak to each other I should go with the WCF SOAP route since it has more features, and if I want to make more clients to the service such as web, iPhone and android clients, then I should go the REST route. Now another question rises, does that mean that WCF SOAP is dying? Since Web API is the new one on the block?
 

NicoVermeir

New member
Sep 22, 2014
4
0
0
Visit site
I did a lot of reading and web service web api, rest and soap. This is drawing me confusion. So some say that if I am building two apps that will explicitly speak to each other I should go with the WCF SOAP route since it has more features, and if I want to make more clients to the service such as web, iPhone and android clients, then I should go the REST route. Now another question rises, does that mean that WCF SOAP is dying? Since Web API is the new one on the block?
they both have their uses. In my opinion, WCF SOAP is excellent for enterprise level client / server stories build on .NET technologies.
REST is great for mobile clients because of its smaller payload and it being completely platform independent
 

Ali El

New member
Apr 3, 2014
83
0
0
Visit site
I see, so it's more like an opinion and which is better for the job over which is better than the other. Thanks! I'll build small scale of each and see which I like better.
 

Ali El

New member
Apr 3, 2014
83
0
0
Visit site
Is there services we know of that use wcf and services that use rest? I know some small apps that use rest but I've never heard of large services that use wcf soap. Anyone know of any?
 

drachen23

New member
Nov 5, 2011
86
0
0
Visit site
I did a lot of reading and web service web api, rest and soap. This is drawing me confusion. So some say that if I am building two apps that will explicitly speak to each other I should go with the WCF SOAP route since it has more features, and if I want to make more clients to the service such as web, iPhone and android clients, then I should go the REST route. Now another question rises, does that mean that WCF SOAP is dying? Since Web API is the new one on the block?

WCF and ASMX SOAP services are nice for .Net consumption because you can just point Visual Studio at the service endpoint using "add service reference" and it generates a nice proxy class for you to use. Without that tool, you need to write your own code to get the data manually using something like HttpClient. It's much more straightforward to get data out of a REST service manually than a SOAP service. If you are just writing a web service to be consumed by a Universal app, there is no advantage to SOAP for you.
 

Ali El

New member
Apr 3, 2014
83
0
0
Visit site
"There is no advantage to using SOAP for you"

What advantages would I be missing out on? Maybe I can use them to make the service more robust. I don't mind putting in the work if it means I'm future proof as well as feature rich, it's better to know that I can later add features as I please.
 

eshy

New member
Sep 6, 2011
71
0
0
Visit site
WCF is a toolkit that allows you to create SOAP, REST and other formats of services.

Since you want to create a web service, the discussion is really between SOAP and REST.

SOAP is the older of the two and is heavier. While it might makes sense for enterprises, it doesn't make too much sense for mobile apps or web SPAs. You want the lightest fastest solution and a REST api that returns JSON is usually the best way to go (which is why most web services out there use it)


On the technology side, Microsoft has moved on from WCF for REST services. If you want to use .Net you should use Asp.Net Web Api. It's really easy to build an API with that stack.
 
Last edited:

Ali El

New member
Apr 3, 2014
83
0
0
Visit site
Thank you for the clear explanation. So REST is where we're all headed, I did play with asp.net web API, it is nice and light. I think I'm going to go with that.
 

Ray Adams

New member
Jul 3, 2012
993
0
0
Visit site
Will put my 2 cents here.
All my last server side projects for mobile support are written on ASP MVC using JSON as in/out protocol. It is very easy to write such services on MVC and JSON gives you ability to use your service with any available mobile OSes.
 

Members online

Forum statistics

Threads
326,611
Messages
2,248,633
Members
428,522
Latest member
BarkerJarrod