Published on May 20, 2009
Diving Into Services With WCF Chris Deweese
Announcements / Contact Chris • Twitter: @cdeweese • Web: http://christopherDeweese.com • From IL? See me about an IL Metro .NET Users Group • St Louis Day of .NET August 28-29 @Ameristar in St Charles
Agenda • Part 1 – WCF Basics ▫ What & Why of WCF ▫ Key Concepts ▫ WCF Architecture ▫ ABCs of WCF ▫ Code! And Demo • Part 2 – Advanced WCF ▫ Business Case ▫ Architecture ▫ Code! And Demo
What is WCF • Framework for building service-oriented applications • Separates the logic of services from the channels they communicate on • Messages based on Simple Object Access Protocol (SOAP) • Support for REST & Plain-old Xml (POX) as of .NET 3.5
Why WCF • Evolution of service oriented thinking • Remoting, Message Queuing, and ASMX were designed on different stacks • WCF unifies the programming model for exposing services through different channels (Web, Message Queues, TCP) ▫ Service logic and function is not dependent on the channel or transport
Key WCF Concepts • Service – Unit of work exposed to the world. • Endpoint – the collection of the services address, binding, and contract. • Binding – How you interact with the service at the wire level. • Channel – Picks the message up from the wire format and brings it into the WCF stack. • Dispatcher – Manages execution of service code by routing messages to the appropriate service instance and method. • Behavior – How you can control the local execution of a service.
Hosting WCF Services • In Process • Windows Service • Web Service (IIS) • Windows Activation Services ▫ WAS allows you to host a service on any binding
ABC’s of WCF
Address • “Dude where’s my service?” • The location of the service on the network where it can be reached. ▫ http://localhost/wantedperson/v1/wanted.svc ▫ net.msmq://localhost/private/wantedpersonv1 ▫ net.tcp://localhost:6000/wantedpersonv1 • Set via configuration or through code
Binding • “How do I talk to this thing?” • The protocol and policies used to connect to the service at it’s address. • WCF Provided Bindings ▫ Http(BasicHttp, WsHttp, WsDualHttp, WsFederation) ▫ NetMsmq ▫ MsmqIntegration ▫ NetNamedPipe ▫ NetTcp ▫ NetPeerTcp • Set via configuration or through code
Contract • “What’s it going to do for me?” • Defines the operations, inputs, outputs, and message exchange patterns of the service. • Defined using an Interface; wired into WCF by using the ServiceContract attribute. Methods use the OperationContract attribute. Classes use the DataContract attribute and members use the DataMember attribute. • WCF Serialization is “Opt-In”
WCF Basics – Demo and Code!
Photo by szeke: http://www.flickr.com/photos/pedrosz/
Part II: Advanced WCF
Concepts Demonstrated • Tracing • Fault Contracts • Multiple Endpoints • Custom Service Host • Custom Service Behavior ▫ Unity Integration for Inversion of Control ▫ Unity Lifetime Manager (Singleton) • Service Instancing Behavior • Enterprise Library Exception Handling Integration
WCF Advanced – Demo and Code!
In this new eLearning course, students will get an introduction to SQL Server Reporting Services (SSRS). This course is designed for report developers who ...
Diving into Data: Creating Meaningful Career Services Annual Reports Jon Schlesinger
Diving into Data Analysis. Get Started with ScaleR and Data Analysis. ... SQL Server R Services. Microsoft R Client. What's New. Get Started ...
Total Running Time: 181 minutes In this new eLearning course, students will get an introduction to SQL Server Reporting Services (SSRS). This ...
Diving into Data for Narellan Pools. ... Narellan 'Diving into Data' ... Services; Blog; Careers; Contact ...
Chapter 4: Diving into Bing Maps REST Services The application. The router module. The controller. The model. The proxy. The view. Displaying the route ...
93% of organizations now use at least one cloud-based service. Spiceworks discusses how IT buyers perceive cloud storage, productivity, and computing providers
Microsoft Dynamics AX 2012 - A Dive into Services, Custom Services (Part II) Microsoft Dynamics AX 2012 - A Dive into Services, ...
Through the Tec Deep Diver course you'll learn the rudimentary skills for diving deeper than [...] 40m, making dives with planned ...