What is the difference between WCF and Web Service?

Source: Internet
Author: User
Tags msmq

What is the difference between WCF and Web Service? What is the relationship with ASP. NET web service? What is the difference between WCF and ASP. NET web service?

This is a problem that many. NET developers may make mistakes. I often encounter this problem during interviews. Many new users will also be confused by their first contact with WCF or Web Services, and many materials are not accurate. I have even discussed these issues with many developers who have years of development experience. They cannot tell the difference between them. I believe many people are misled. The following are the most common incorrect ideas:

Web service is too old; web service is ASP. net web service; WCF has better performance than Web Service; WCF has better performance than ASP. NET Web Service is faster; WCF is faster than Web Service; WCF is more powerful than Web Service; WCF is safer than Web Service; web service will be replaced by WCF; and WCF is actually a web service; WCF is very simple, but there is nothing;

And so on. I believe many people have heard or come into contact with these ideas. We will analyze in detail the causes of errors in each opinion later. In the future, you will have a reference in your study and interview.

---------------------------------------

The following is a similar question from the WCF Chinese Forum, referencing ymq:
Good
In the past, Web services were used more often and were basically familiar with them. Recently, I came into contact with WCF. Maybe it was the reason why I was new to them. How do I feel more complicated than Web Services, it seems that the advantages are not very obvious .....
Thank you. I used to discuss a problem with them at the WCF Chinese technical forum.

---------------------------------------

Next we will discuss in detail the differences between the two. What is the difference between Web Service and WCF.

[1]Web Service: strictly speaking, it is an industry standard, that is, the Web Service Specification, also known as the WS-* specification. It is neither a framework nor a technology.

It has a set of standardized system standards, and is continuously updated and improved.

It uses XML extension markup language to represent data (this is the key to the exaggerated language and platform ). Microsoft's Web service implementation is called ASP. NET web service. It uses the Simple Object Access Protocol soap to implement applications in a distributed environment.ProgramBetween. Description of the service interface. In addition, Web services can be registered to the UDDI Center for customers to find and use.
Later, Microsoft implemented ASP. NET Web Service Security, performance, data encryption, decryption, hosting host and other aspects of the extension, called the WSE series, this is an over-product, up to wse3.0. later is the WCF era. (Knowledge of distributed development in WCF (4): Web Service)

[2] ASP. NET web service: Microsoft provides a Web service development framework, which is part of the ASP. NET Framework, but supports the early ws specification. For example, soap1.1.
[3]WCF: A Distributed Application Development Framework, a specific technology or platform. It is neither a standard nor a standard.

To some extent, WCF is ASP. net web service, because it supports the industry standard and Core Protocol of Web Service, Asp. net web service and WSe can do almost all the things they can do. cross-platform and language are not a problem (data also supports XML formatting and provides their own formatter ).
However, as a communication component or platform promoted by Microsoft, WCF aims not only to support and integrate Web Services, because it is also compatible with and has many features of Microsoft's early technology.
According to Microsoft's official explanation, WCF (formerly known as "Indigo") is hosted Code Establishes and runs a unified framework for service-oriented applications. It enables developers to build a secure, trusted, and transactional solution across platforms, and to be compatible with existing systems. WCF is a set of developers for Microsoft Distributed Application Development. It integrates. NET platform, such as enterprise Sevices (COM + ). net remoting, Web Service (asmx), wse3.0, and MSMQ message queues. In terms of the scope of communication (communiation), it can be cross-process, cross-machine, cross-subnet, enterprise network or even internet; in terms of host programs, it can be ASP. net, EXE, WPF, Windows Forms, NT Service, COM + as the host (host ). The protocols supported by WCF include TCP, HTTP, cross-process, and custom. Security modes include SAML, Kerberos, X509, user/password, and custom. That is to say, it is easy to develop a SOA-based Distributed System under the WCF framework. Microsoft includes all the technical elements related to this, and has mastered the concept, it is equivalent to mastering the key to open the SOA door. If you want to learn more systematically about WCF, you must go to enterprise Sevices (COM + ). net remoting, Web Service (asmx), wse3.0, and MSMQ message queues also have a detailed understanding, you can read my blog, before that, I systematically sorted out the knowledge related to WCF learning. This is Article Directory: Lao Xu's blog: document directory.
Another point is that many people are interested in learning WCF. I started from the past and ran directly to WCF. In fact, it was difficult to learn it later, because of the many features and advantages claimed by WCF, we cannot understand it, but we cannot understand it. As mentioned in this Article, if many early Microsoft technologies have never been used, we cannot have a profound understanding of these comparisons.

[4] Conclusion:

After reading these analyses, we can see why the above conclusions are wrong.

No technical framework can be compared with industry standards. any comparison between the two is wrong, because they are not in the same category. Just like comparing a car with a traffic regulation. This is a misunderstanding.

The Web service is too old: different frameworks have different versions, but there are new and old features. However, it is best for a specific system to suit itself. Web Service is ASP. NET web service: it is also not a category. The former specification, the latter is that the framework WCF has better performance than the Web Service: not a category, and WCF is better than ASP. NET Web Service is fast: Not necessarily, it requires specific restrictions. When using basichttpbinding in WCF.. NET web service protocol is the same. Faster than Web Services: The concept is also not strict. WCF is more powerful than Web Service: it integrates a variety of Microsoft Distributed technologies, but here it should be strictly said: ASP. NET web service WCF is safer than Web Service: not strict. Secondly, WCF can also develop completely streaking applications. Web service will surely be replaced by WCF; web service will not be replaced by WCF! The former is a set of widely used specifications. If WCF can replace ASP. NET web service, both of them are technologies on the. NET platform. WCF is actually a Web Service: in some cases, WCF does not comply with the Web Service Specification, that is, it can develop non-service applications. It cannot be simple or equivalent. WCF is very simple, but there is nothing: although it is a service development framework, if you study it in depth, you will find the strength of the WCF architecture. It is already quite complicated to use WCF security alone. Furthermore, a unified programming model is required to be compatible with and support many early distributed technologies. Many people come to the conclusion that they only read some articles or books and do not necessarily write code. The experts won't come to an arbitrary conclusion.

WCF is definitely a technology worth learning. If you study it in depth, you will find that it is really not simple.

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.