15.02.2015 Views

C# 4 and .NET 4

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

43<br />

Windows Communication<br />

foundation<br />

WhaT ’ s in This ChaPTer<br />

➤<br />

➤<br />

➤<br />

➤<br />

➤<br />

➤<br />

➤<br />

➤<br />

W C F o v e r v i e w<br />

A simple service <strong>and</strong> client<br />

Service, Operation, Data, <strong>and</strong> Message Contracts<br />

Implementing a Service<br />

Using Binding for Communication<br />

Different Hosting Options for Services<br />

Creating Clients with a Service Reference <strong>and</strong> Programmatically<br />

Duplex communication<br />

Previous to .<strong>NET</strong> 3.0, several communication technologies were required in a single enterprise<br />

solution. For platform - independent communication, ASP.<strong>NET</strong> Web services were used. For more<br />

advanced Web services — technologies such as reliability, platform - independent security, <strong>and</strong> atomic<br />

transactions — Web Services Enhancements added a complexity layer to ASP.<strong>NET</strong> Web services. If<br />

the communication needed to be faster, <strong>and</strong> both the client <strong>and</strong> service were .<strong>NET</strong> applications, .<strong>NET</strong><br />

Remoting was the technology of choice. .<strong>NET</strong> Enterprise Services with its automatic transaction<br />

support, by default, used the DCOM protocol, which was even faster than .<strong>NET</strong> Remoting. DCOM<br />

was also the only protocol to allow the passing of transactions. All of these technologies have<br />

different programming models that require many skills from the developer.<br />

.<strong>NET</strong> Framework 3.0 introduced a new communication technology that includes all the features<br />

from these predecessors <strong>and</strong> combines them into one programming model: Windows Communication<br />

Foundation (WCF).<br />

WCf oVerVieW<br />

WCF combines the functionality from ASP.<strong>NET</strong> Web services, .<strong>NET</strong> Remoting, Message Queuing,<br />

<strong>and</strong> Enterprise Services. What you get from WCF is:<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!