Since the company wants to use WCF for website operations, it feels a bit difficult to come into contact with WCF for the first time,
However, if you think about it, it seems that using wcf is much safer to process the business independently,
At present, our website is a direct client, and everything is lost on one server (that is, a server can handle multiple functions, rather than sharing them with individual servers)
WCF is a Service-Oriented Architecture (SOA ).
WCFIntroduction
WCF is short for Windows Communication Foundation. It is originally codenamed Indigo and MS is a Service-Oriented SOA (Service Oriented Architecture)
And a complete technical framework. It can be used to develop Distributed (Distributed) applications. WCF is the most advanced SOA framework on the Microsoft platform. It has many advantages. To sum up, its biggest characteristic is:
1.Fully integrates the original. NET Remoting, ASP. NET Xml Web Service (ASMX, Web Service), MSMQ (Message Queuing Message Queue), WSE (Web Services Enhancements ),
Enterprise Service (COM +) and many other distributed technologies.
2.As an important part of. NET Framework 3.5, WCF is a distributed communication programming Framework provided by Microsoft to build service-oriented applications. With this framework, developers can build cross-platform,
Enterprise-level interconnected application solutions that are secure, reliable, and support transaction processing.
3.WCF provides all the functions of existing ASP. NET Web Service,. NET Remoting, Message Queuing, and Enterprise Services technologies. Existing solutions have their own advantages and disadvantages. WCF combines the advantages of the above technologies and forms a new technology.
WCFOverviewWCFProvides the following features:
1.Resident components and services: with the use of custom host ,. like WSE, NET Remoting can place the WCF Service in ASP.. NET Library, Windows Service, COM +, or Windows Form program, perform peer-to-peer computing.
2.Declarative operation: it is not necessary to derive from the base class (. NET Remoting remote object derived from MarshalByRefObject), you can use the property definition service, similar to ASP.. NET Web services (using the [WebMethod] attribute description method, marked as accessible through Web services ).
3.Communication Channel:. NET Remoting is flexible in changing communication channels, while WCF is a good alternative and provides the same flexibility. WCF can communicate over HTTP, TCP, and IPC (interprocess communication) channels. UDP channels are also supported.
4.Security Architecture: to implement Web services independent from the platform, a standard security environment must be used. The existing standards are implemented using WSE2.0. In WCF, WS-Security, WS-Trust, and WS-SecureConversation are added to SOAP messages for user authentication, data Integrity Verification, data privacy, and other security factors.
5.Scalability:. NET Remoting has a variety of extended functions. It can create custom channels, formatters, and proxies, and can also insert functions in the client and server message streams. WCF provides similar scalability, but these extensions are implemented using SOAP Headers.
6.Compatibility: With WCF, you do not need to rewrite the Distributed Solution. Therefore, WCF can be well integrated with existing technologies. WCF provides a channel that can use DCOM to communicate with the service components. Using ASP. NET Web services to create platform-independent services can also be easily integrated with WCF.
WCFOverviewWCFPurpose:
In win32, an application is running in the Process Thread ,. after the emergence of the Net platform, AppDomain (application domain) emerged. In fact, it is equivalent to another layer of packaging between processes and threads, similar to the concept of sub-processes, objects in a process (or application domain) can be directly accessed and controlled, but beyond this range, direct access and control are not allowed, therefore, processes (or application domains) are isolated. If different processes are distributed in different networks and operating systems, it is more difficult for them to communicate, distributed applications require that the originally isolated scopes be linked through a certain contract to achieve communication and collaboration between multiple systems. For example, in the Win32 era, ing memory files are often used to implement interoperability between processes. In Windows programs, Windows message wm can also be used to implement communication between different processes, however, these limitations exist because they cannot effectively solve cross-platform and cross-network problems, while WCF can.
I will introduce so much about it. These materials are all found online. Just understand them. You don't have to worry about these conceptual issues. You just need to understand them. I have a rough impression. Oh, I only read it once.
The simplest WCF is divided into: Contract interface layer, contract implementation layer, host layer, and customer layer.
1. contract interface: According to this name, it is an interface layer. However, both methods and class names in the interface are described using a fixed WCF statement, the keywords used include "ServiceContract" and "OperationContract ";
2. Contract Implementation Layer: inherits the contract interface, which is used to implement specific contract methods. ServiceBehavior can be declared inside the class or in the host configuration file;
3. Host layer: This layer is used to provide services and distributed call requests sent from the client. In the host, a program is used to distribute services. win32, winform, and webservice can be used to distribute services.
4. Customer layer: a client that calls methods in wcf;