What is the difference between Web service and WCF?

Source: Internet
Author: User
Tags hosting managed hosting msmq

"1" Web service: Strictly speaking, the industry standard, the WEB service specification, also known as the WS-* specification, is neither a framework nor a technology.

It has a complete set of standard system standards, but also in the continuous improvement of the update.

It uses XML extension markup language to represent data (this is the key to language and platform). Microsoft's Web service implementations are called ASP. It uses the SOAP simple Object Access protocol to implement data interactions between applications in a distributed environment. WSDL to implement a service interface-related description. In addition, Web services can be registered with the UDDI Center for use by its customers.
Later, Microsoft made ASP. NET Web service security, performance, data encryption, decryption, managed hosting, and many other extensions, called the WSE series, this is over-product, up to WSE3.0. And then it was the WCF era.

"2" asp: Microsoft provides a development framework for Web services that is part of the ASP. But supports the early-riser WS specification. Like SOAP1.1.
The "3" WCF:WCF is a development framework for distributed applications that belongs to a specific technology, or platform. Neither the standard nor the norm.

WCF is, in part, an ASP. NET Web service, because it supports the industry standard and core protocols of Web service, so what ASP. NET Web service and WSE can do, it is almost capable, Cross-platform and language is not a problem (the data also supports XML formatting and provides its own formatter).
But WCF, as Microsoft's main push for a communications component or platform, aims not only to support and integrate Web Service, because it is also compatible and has the features of many of Microsoft's early technologies.
According to Microsoft's official explanation, WCF (previously known as "Indigo") is a unified framework for building and running service-oriented services (oriented) applications using managed code. It enables developers to build a secure, trustworthy, transactional solution across platforms that can be compatible with existing systems. WCF is the integrator of Microsoft's distributed application development, which integrates. NET platform, all technologies related to distributed systems, such as Enterprise Sevices (COM +). NET Remoting, Web Service (ASMX), WSE3.0, and MSMQ Message Queuing. In the context of communication (communiation), it can span processes, across machines, across subnets, corporate networks and the Internet, and in the host program, you can host Asp.net,exe,wpf,windows forms,nt service,com+ (Host). WCF can support protocols including tcp,http, cross-process and custom, and security mode includes SAML, kerberos,x509, user/password, custom and many other standards and patterns. That is, under the WCF framework, it is easy to develop a distributed system based on SOA, and Microsoft has included all the technical elements associated with it, mastering WCF as the key to opening the door to SOA. If you want to systematize WCF learning, you must make a pair such as Enterprise Sevices (COM +). Net Remoting, Web Service (ASMX), WSE3.0 and MSMQ Message Queuing also have a detailed understanding of the words, you can look at my blog, before my knowledge of WCF learning has been systematically organized. This is the article directory: Lao Xu's blog: Article directory.
Also, a lot of people are interested in WCF learning, at the outset, I also, directly to WCF, in fact, in the later learning to feel the difficulty, because the WCF claims many features and advantages, we can not understand, more can not realize. The article mentions that many of Microsoft's early technologies, if not touched, will not have a deep understanding of these comparisons.

"4" Conclusion:

Then we look at these analyses and we can see why the above conclusions are wrong.

It is not possible to compare a technical framework with an industry standard, and any comparison between the two is wrong, since the roots are not in the same category. It's like you can't compare a car with a traffic law. This is a mistake.

Web service is too old: The framework versions of the differences, functional features are new and old, but for a particular system, the best for their own. Web service is ASP. NET Web service: Also not a category. The former specification, the latter being framework WCF is better than Web service performance: Not a category, WCF is faster than ASP. NET Web service: Not necessarily, requires specific constraints, WCF uses BasicHttpBinding when using the ASP. NET Web Service agreement. WCF is faster than Web service: The same concept is not strict. WCF is more powerful than Web service: WCF is a distributed technology that integrates a variety of Microsoft, but it should be strictly said: ASP. NET Web service WCF is more secure than Web service: not strict. Second, WCF can also develop completely bare-ben applications. Web service will be replaced by WCF, and Web service will not be replaced by WCF! The former is a set of widely used norms. If WCF can replace ASP. NET Web Service, because both are. The technology on the net platform. WCF is actually the Web SERVICE:WCF in some cases do not adhere to the Web services specifications, that is, can develop non-service nature of the application. and cannot be simply equated. WCF is very simple, but there is nothing: WCF is a service development framework, but if you delve deeper, you will find the power of the WCF architecture. WCF security alone is already quite complex. Moreover, the unified programming model is compatible and supports many early distributed technologies. Many people easily come to the conclusion that they must have read only a few articles or books, not necessarily written code. A master is not so judgmental as to conclude.

In the various protocols that WCF supports: messages in each protocol have different transport formats, different encoding formats, and so on, WCF calls a variety of encoders in a unified manner and transmits them. If a new protocol comes up in the future, WCF will not be able to support the protocol by changing the existing framework, only by extending it for that protocol. This is well adapted to change, and it can be said that WCF is a great practice for package changes.

Let's talk about your problem. What is the relationship between WCF and Web services, WCF is able to create services that are compatible with Web services, which means that you can create services that are interoperable with Web services, and neither of them is represented by simple inclusions or equivalent relationships. WCF is a set of frameworks that are used to create various services . This includes creating a Web service (a service with BasicHttpBinding bindings is a Web service).

WCF can be independent of IIS.
WCF can be configured as BasicHttpBinding to be compatible (or become) WS.
WCF can transmit data based on TCP or Messegequeue.
WCF is more configurable than WS, such as security.
WCF can be stateful and supports transactions.
WCF supports multiple communication protocols Http/https, TCP/UDP, MSMQ, Named Pipes, Peers,
Messaging accessibility, transaction flow, and so on.
WCF can integrate with ASP, share a context (HttpContext).
WCF supports a variety of message transmission formats: Text,binary,mtom,json, and so on.
WCF security is stronger: supports symmetric security, asymmetric security, message security, transport security,
SSL streaming security, Windows streaming security, and so on.
WCF supports multiple session modes: one-way, two-way, request/response.
WCF supports rest.
WCF supports a variety of formatting methods. DataContractSerializer, XmlSerializer,
DataContractJsonSerializer and so on.
WCF supports was hosting, Windows service hosting, Self-hosting, IIS hosting, and so on.
WCF supports multiple concurrency modes: singleton, monotonic, session.

Note: This article is reproduced in: http://www.cnblogs.com/tearer/archive/2013/04/25/3042430.html

What is the difference between Web service and WCF?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.