2

what is this WCF ? i used web services little bit but don't know about theses WCF, read a lot on google but couldn't get its technical terms like http://www.codeproject.com/Articles/139787/What-s-the-Difference-between-WCF-and-Web-Services or msdn.

It says like communication over HTTP and SOAP , serialization, soap etc but yet I'm not qualified to understand these. Help me, guide me and please in easy wordings.

[WebService] 
public class Service : System.Web.Services.WebService 
{ 
  [WebMethod] 
  public string Test(string strMsg) 
  { 
      return strMsg; 
  } 
}

etc and how to use them with asp.net ?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Hunain
  • 99
  • 1
  • 3
  • 13
  • possible duplicate of [Web Services -- WCF vs. Standard](http://stackoverflow.com/questions/6666/web-services-wcf-vs-standard) – John Saunders Oct 13 '13 at 20:56
  • Welcome to Stack Overflow! ASMX is a legacy technology, and should not be used for new development. WCF or ASP.NET Web API should be used for all new development of web service clients and servers. One hint: Microsoft has retired the [ASMX Forum](http://social.msdn.microsoft.com/Forums/en-US/asmxandxml/threads) on MSDN. – John Saunders Oct 13 '13 at 20:59
  • ok what does serialization etc mean in this context ? – Hunain Oct 13 '13 at 21:20
  • You should read http://stackoverflow.com/questions/6666/web-services-wcf-vs-standard. – John Saunders Oct 13 '13 at 21:21
  • it say you can get a service running not-too-hellishly with some copy&paste and filling the blanks but it will take most developers months before they understand what all that configuration and setup actually does. so would i have to learn configuration ? is that necessary ? – Hunain Oct 13 '13 at 21:22
  • Read the whole thing, not just one comment by one person. – John Saunders Oct 13 '13 at 21:28

1 Answers1

4

Windows communication foundation or Wcf is a framework for building services. Wcf supports exposing web services, services based on urls (rest) or services ment only to work on a single machine, such as two different programs communicating via shared memory.

Basically wcf abstracts the service (a .net interface) and the transport (or in wcf terms, a binding). A single service in Wcf can be exposed as a web service or using shared memory without any actual code changes, the endpoints are all based on app config files.

Perhaps this article on msdn will make things clearer http://msdn.microsoft.com/en-us/library/ms731082.aspx

Some terms,
Interoperability - to operate, or work together, with something else (inter- between, operate- work together) a wcf service can interoperate with a client written in java for example

Serialization - to convert an object to a stream of bytes that can be sent somewhere and then deserialized back into an object

aL3891
  • 6,205
  • 3
  • 33
  • 37