1 / 25

Getting started with windows communication foundation 4.5

A comprehensive guide to understanding and implementing Windows Communication Foundation (WCF) 4.5 for building service-oriented applications. Learn about SOA principles, contracts and bindings, hosting and consuming services, and the new features in WCF 4.5.

berthap
Download Presentation

Getting started with windows communication foundation 4.5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Getting started with windows communication foundation 4.5 Ed Jones & Grey Guindon

  2. Welcome to Twin cities Code Camp!

  3. Overview What does it mean to be SOA? Contracts and Service Implementation Bindings and Behaviors Hosting the Service Consuming WCF Services What’s New in 4.5?

  4. Camp goldycode 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.

  5. Service oriented architecture and principles

  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”

  7. SOA Design principles Explicit Boundaries Share Contract and Schema, not Classes Autonomous Stateless Interoperable

  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.com • Click “Try It Free”

  9. How it works: A WCF Overview

  10. WCF Contracts Building out service and data contracts

  11. Contracts can be kind of sticky…

  12. WCF Contracts • Contracts determine what data and operations are exposed • Service contracts define operations • Data contracts define the data (duh!) • And you’ve got other contracts, too • Message Contracts • Fault Contracts

  13. A Contract is just a Schema…

  14. Service contracts & data contracts

  15. Configuring the service

  16. 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.

  17. ABC’s: Address, Binding, Contract

  18. Hosting the service

  19. 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.com • Click “Try It Free” • A lot of things require a host!

  20. Using a wcf service

  21. 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

  22. Other things you can do with wcf Secure Services RESTful Services Routing Streaming Data Discovery Web Sockets …and much, much, more

  23. What’s 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

  24. References Wikipedia – “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 John 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

  25. Thank you! • Ed Jones, MCT, MCPD (Web, Azure), MCTS (WCF, BizTalk) • Email: ed.jones@rbaconsulting.com • Blog (Extremely Talented Monkeys): http://talentedmonkeys.wordpress.com

More Related