+ All Categories
Home > Documents > GETTING STARTED WITH WINDOWS COMMUNICATION FOUNDATION 4.5 Ed Jones & Grey Guindon.

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

Date post: 30-Mar-2015
Category:
Upload: madelyn-poynter
View: 218 times
Download: 0 times
Share this document with a friend
Popular Tags:
25
GETTING STARTED WITH WINDOWS COMMUNICATION FOUNDATION 4.5 Ed Jones & Grey Guindon
Transcript
Page 1: GETTING STARTED WITH WINDOWS COMMUNICATION FOUNDATION 4.5 Ed Jones & Grey Guindon.

GETTING STARTED WITH WINDOWS COMMUNICATION FOUNDATION 4.5

Ed Jones & Grey Guindon

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

WELCOME TO TWIN CITIES CODE CAMP!

P:2

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

OVERVIEW

What does it mean to be SOA?Contracts and Service ImplementationBindings and BehaviorsHosting the ServiceConsuming WCF ServicesWhat’s New in 4.5?

P:3

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

CAMP GOLDYCODE CAMPING RESERVATION SYSTEM

A simple service that allows one to make, alter, or cancel a reservation at the Camp Goldy Code CampgroundThe reservation system is available to any client, regardless of type of code, native OS, etc.

P:4

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

SERVICE ORIENTED ARCHITECTURE AND PRINCIPLES

P:5

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

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:6

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

SOA DESIGN PRINCIPLES

Explicit BoundariesShare Contract and Schema, not ClassesAutonomousStatelessInteroperable

P:7

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

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 BizTalkAnd speaking of Azure…– Free 90-day trial at http://www.windowsazure.com– Click “Try It Free”

P:8

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

HOW IT WORKS: A WCF OVERVIEW

P:9

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

WCF CONTRACTSBuilding out service and data contracts

P:11

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

CONTRACTS CAN BE KIND OF STICKY…

P:12

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

WCF CONTRACTS

Contracts determine what data and operations are exposedService contracts define operationsData contracts define the data (duh!)And you’ve got other contracts, too– Message Contracts– Fault Contracts

P:13

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

A CONTRACT IS JUST A SCHEMA…

P:14

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

SERVICE CONTRACTS & DATA CONTRACTS

P:15

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

CONFIGURING THE SERVICE

P:16

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

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

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

ABC’S: ADDRESS, BINDING, CONTRACT

P:18

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

HOSTING THE SERVICE

P:19

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

HOSTING THE SERVICE

A WCF Service is a library, it has no life of its ownThe 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 AzureAnd speaking of Azure…– Free 90-day trial at http://www.windowsazure.com– Click “Try It Free”

A lot of things require a host!

P:20

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

USING A WCF SERVICE

P:21

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

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

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

OTHER THINGS YOU CAN DO WITH WCF

Secure ServicesRESTful ServicesRoutingStreaming DataDiscoveryWeb Sockets…and much, much, more

P:23

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

WHAT’S NEW IN WCF 4.5

Config File Tooltips, IntelliSenseContract-First GenerationGenerate Classes from Sample XMLASP.NET compatibility mode (aspNetCompatibilityEnabled) defaults to “true”WCF Configuration ValidationStreaming ImprovementsSingle WSDLWebSocket SupportChannelFactory CachingUDP SupportHttpClient Class

P:24

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

REFERENCES

Wikipedia – “Service-Oriented Architecture” http://en.wikipedia.org/wiki/Service-oriented_architectureStefan Tilkov, “10 Principles of SOA” http://www.infoq.com/articles/tilkov-10-soa-principlesJohn Spacey, “The 9 Principles of Service Oriented Design” http://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.aspx

P:25

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

THANK YOU!

Ed Jones, MCT, MCPD (Web, Azure), MCTS (WCF, BizTalk)– Email: [email protected]– Blog (Extremely Talented Monkeys): http://

talentedmonkeys.wordpress.com

P:26


Recommended