views:

39

answers:

3

I got a lot of theoretical answers from Google that WCF is better than Web Service etc. etc. But I want to know from the programming and implementation point of view. I am very new to coding and want to know that how do we implement all three of these technologies? How are they different and in which scenario we should used which technologies?

Thank you in advance.

+3  A: 

A web service is an API that is hosted for access via a network connection - often the internet - and usually accessed over HTTP (or HTTPS).

WCF is a Microsoft .NET development framework that can be used to implement web services. That is, WCF-services are a subset of all web-services.

Windows services are a separate beast entirely: they are long-running programs that run on your local Windows machine, typically with no user interaction and on system accounts. They are used to handle many things in Windows, from low-level driver functionality to software updates.

Dan Puzey
Thanks Dan. I got that idea but I want to know from the implementation point of view in .NET framework using C#. When I use all 3 technologies in my .NET windows form project, how will they differ. What are the steps to create each of them? Can you redirect me to proper place where I can find this information that is also its ok. Also when do we use each of these technologies?Thanks.
@Dan: actually, WCF is a **superset** of web services. WCF is the "new" web services - and a lot more.
marc_s
@marc_s: there's nothing you can do in WCF (web-services) that you can't do in any other web-service-implementing technology. Admittedly WCF includes functionality for alternative ways of hosting a service, but if you're using WCF to host a named-pipes service then it's not a web service any more. I'd agree that "All available WCF services" *intersects* with "all web services", but it's not a complete superset - but I'd still stand by a (slightly-tweaked) "WCF *web* services" are a subset of "all web services"
Dan Puzey
+1  A: 

You're really comparing apples and oranges. A web service is simply a program that you can "call" using the HTTP protocol. Typically, HTTP requests sent to the service contain some XML describing the method called and any parameters. The response from the service likewise contains XML with the return value and any output parameters. It's a little more complicated than this, but it gives you the basic idea.

Windows Communication Foundation (WCF) is a framework for building network services. You can use this framework to build web services if you wish. I suspect that what's tripping you up are the various Visual Studio project templates. You have one for WCF services and one for web services. The web service template builds a web service that runs inside of IIS. The WCF template gives you far more flexibility (you can make a web service as a stand-alone application, for example), but it is far more complicated.

If you're just beginning, I'd start with web service template and IIS-based web services.

Peter Ruderman
A: 

MSDN is always a good reference:

Web Service Tutorial: http://msdn.microsoft.com/en-us/library/8wbhsy70%28VS.80%29.aspx

WCF Tutorial: http://msdn.microsoft.com/en-us/library/ms734712.aspx

I think its always easier to learn by doing.

Good luck

Caleb Postlethwait