Presentation is loading. Please wait.

Presentation is loading. Please wait.

GETTING STARTED WITH WINDOWS COMMUNICATION FOUNDATION 4.5 Ed Jones & Grey Guindon.

Similar presentations


Presentation on theme: "GETTING STARTED WITH WINDOWS COMMUNICATION FOUNDATION 4.5 Ed Jones & Grey Guindon."— Presentation transcript:

1 GETTING STARTED WITH WINDOWS COMMUNICATION FOUNDATION 4.5 Ed Jones & Grey Guindon

2 WELCOME TO TWIN CITIES CODE CAMP! P:2P:2

3 OVERVIEW What does it mean to be SOA? Contracts and Service Implementation Bindings and Behaviors Hosting the Service Consuming WCF Services Whats New in 4.5? P:3P:3

4 CAMP GOLDY CODE CAMPING RESERVATION SYSTEM A simple service that allows one to make, alter, or cancel a reservation at the Camp Goldy Code Campground The reservation system is available to any client, regardless of type of code, native OS, etc. P:4P:4

5 SERVICE ORIENTED ARCHITECTURE AND PRINCIPLES P:5P:5

6 WHAT IS SERVICE ORIENTATION? Service-Oriented Architecture (SOA) is a set of principles and methodologies for designing and developing software in the form of interoperable services. These services are well- defined business functionalities that are built as software components (discrete pieces of code and/or data structures) that can be reused for different purposes. SOA design principles are used during the phases of systems development and integration. -Wikipedia, Service-Oriented Architecture P:6P:6

7 SOA DESIGN PRINCIPLES Explicit Boundaries Share Contract and Schema, not Classes Autonomous Stateless Interoperable P:7P:7

8 WHAT IS WCF? Windows Communication Foundation (WCF) is a framework for building service-oriented applications. It is a runtime and a set of APIs for creating systems that send messages between services and clients. WCF is the foundation for other distributed technologies by Microsoft, such as Azure, AppFabric, and BizTalk And speaking of Azure… –Free 90-day trial at http://www.windowsazure.comhttp://www.windowsazure.com –Click Try It Free P:8P:8

9 HOW IT WORKS: A WCF OVERVIEW P:9P:9

10 Show the VS solution and projects…. P:10

11 WCF CONTRACTS Building out service and data contracts P:11

12 CONTRACTS CAN BE KIND OF STICKY… P:12

13 WCF CONTRACTS Contracts determine what data and operations are exposed Service contracts define operations Data contracts define the data (duh!) And youve got other contracts, too –Message Contracts –Fault Contracts P:13

14 A CONTRACT IS JUST A SCHEMA… P:14

15 SERVICE CONTRACTS & DATA CONTRACTS P:15

16 CONFIGURING THE SERVICE P:16

17 BINDINGS The binding controls the messaging details (what happens on the wire) for that endpoint. Common bindings are common recipes as to how WCF will configure the underlying channel stacks. There are countless extensibility points found throughout the WCF channel layer. P:17

18 ABCS: ADDRESS, BINDING, CONTRACT P:18

19 HOSTING THE SERVICE P:19

20 HOSTING THE SERVICE A WCF Service is a library, it has no life of its own The host brings the WCF service to life by providing the process in which it operates. Most of the time, WCF services will run in a ready-made host environment such as Internet Information Server (IIS) or Azure And speaking of Azure… –Free 90-day trial at http://www.windowsazure.comhttp://www.windowsazure.com –Click Try It Free A lot of things require a host! P:20

21 USING A WCF SERVICE P:21

22 CONSUMING A SERVICE Because WCF exposes service functionality through open standards, such as SOAP, you can use almost any type of client to consume the service. Allowing a.NET client to consume the service is as easy as creating a service reference or generating a proxy through a command-line utility (svcutil.exe) Non-.NET clients would typically use SOAP to consume a WCF Service P:22

23 OTHER THINGS YOU CAN DO WITH WCF Secure Services RESTful Services Routing Streaming Data Discovery Web Sockets …and much, much, more P:23

24 WHATS NEW IN WCF 4.5 Config File Tooltips, IntelliSense Contract-First Generation Generate Classes from Sample XML ASP.NET compatibility mode (aspNetCompatibilityEnabled) defaults to true WCF Configuration Validation Streaming Improvements Single WSDL WebSocket Support ChannelFactory Caching UDP Support HttpClient Class P:24

25 REFERENCES Wikipedia – Service-Oriented Architecture http://en.wikipedia.org/wiki/Service- oriented_architecture http://en.wikipedia.org/wiki/Service- oriented_architecture Stefan Tilkov, 10 Principles of SOA http://www.infoq.com/articles/tilkov-10-soa-principles http://www.infoq.com/articles/tilkov-10-soa-principles John Spacey, The 9 Principles of Service Oriented Design http://simplicable.com/new/the-9-principles- of-soa-designhttp://simplicable.com/new/the-9-principles- of-soa-design MSDN, How to: Host a WCF Service in a Managed Windows Service http://msdn.microsoft.com/en- us/library/ms733069.aspxhttp://msdn.microsoft.com/en- us/library/ms733069.aspx P:25

26 THANK YOU! Ed Jones, MCT, MCPD (Web, Azure), MCTS (WCF, BizTalk) –Email: ed.jones@rbaconsulting.comed.jones@rbaconsulting.com –Blog (Extremely Talented Monkeys): http://talentedmonkeys.wordpress.com http://talentedmonkeys.wordpress.com P:26


Download ppt "GETTING STARTED WITH WINDOWS COMMUNICATION FOUNDATION 4.5 Ed Jones & Grey Guindon."

Similar presentations


Ads by Google