What is WCF for me?
2011-03-16 17:07 Aga.J 阅读(451) 评论(0) 编辑 收藏 举报Recently, one of my project required me to handle WCF (Windows Communication Foundation) to solve some communication problem. So I began to study WCF three days ago.
First of all, I need to find some resources about WCF. Yeah, MSDN is good place to study my investigation on WCF. Here is the web site: http://msdn.microsoft.com/en-us/library/dd456779.aspx. You can clearly learn the whole knowledge about WCF in MSDN. It takes you go throught the process to build a simple WCF application. It explains all concept and all feature details about WCF. Simply speaking, a whole WCF application is composed of Contract, Contract implement(service), host process, Client. We need to design our service contract first. It is realy important because the contract is closed to your business service. Next , we need to implement the contract and configure our services . We can do some change on communication protocol , message encoding and other protocols about security while we are configuring our services. After finishing this, we run our service in the host process(we can host services in many different types of host in WCF). Keeping the service running,we can add web reference in our client application. Once you successfully add the reference, VS will generate all thing about WCF client to you. At last, you simply initiate client proxy and invoke the service you want in your client application. These two pictures below can help you to understand the core of WCF.
I just simply describe something about WCF. If you need more detail, please go to the MSDN. Forgive my idleness.
After I finished reading articles in MSDN, I feel interested in how WCF work in detail. So I find some artical about this and try to analyse a simple WCF project created by myself. A last I find a picture that can explaint a little bit of the detail work the WCF does. Here it is:
It's not easily to see the details clearly. So I redraw it using Chinese.
ok, I recognize that I still can not know details about WCF through this picture. I want to know exactly how WCF does, such as how they translate the interface and class into metadata , how they create the SOAP file, how they use the SOAP file, how they create the client, most importantly , how they communicate through network.
作者:Aga.J
出处:http://www.cnblogs.com/aga-j
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
个人学习笔记仅供本人记录知识所用,不属发表性文章。