Pro Visual C++ 2005 for C# Developers

WCF combines the functionality from ASP.NET Web services, .NET Remoting, Message Queuing, and Enterprise Services. What you get from WCF is:

WCF has a very flexible layered architecture. Distributed applications can be written using a high-level API or a low-level API. The high-level API or service layer can be used to invoke methods and events. The service layer converts these high-level abstractions into messages to use channels and ports from the lower-level API.

Figure 32-6 shows the layers of a WCF application. The application can use messaging services such as queuing, routing, eventing, and discovery. Examples of service behaviors offered to distributed applications are automatic transactions, concurrency management, error handling, and instance creation. The messaging block is divided into two areas: transport channels, which are adapters that connect to transport protocol (for example, HTTP, TCP, UDP, and IPC), and channels that add additional functionality such as security, reliability, and eventing. Transport channels can be combined with other channels. The hosting environment section shows that WCF can be hosted in any application type. WCF services can be offered from ASP.NET, Windows Services, COM+, or in custom executables. This is very similar to.NET Remoting.

Figure 32-6

Figure 32-7 shows how different parts of a WCF application interact. A message is sent to a named port. The transport channel associated with the transport protocol forwards the message to the channel where the message is dispatched to the service.

Figure 32-7

Sending messages can be done in three different ways:

Категории