Getting Started with WCF Windows Communication Foundation 4.0 Development Chapter 1.

Slides:



Advertisements
Similar presentations
Indigo Jonathan Turnbull Nick Cartwright Ivan Konontsev Chris Bright.
Advertisements

Siebel Web Services Siebel Web Services March, From
Chapter 19 – Service-oriented Architecture
WCF Intro Scott Reed Owner - Brain Hz Software Instructor – DevelopMentor
Web Services Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Web Services Nasrullah. Motivation about web service There are number of programms over the internet that need to communicate with other programms over.
Zoiner Tejada Hershey Technologies. About Zoiner Tejada.
.NET Remoting. .Net Remoting Replaces DCOM (Distributed Component Object Model – a proprietary Microsoft technology for communication among software components.
 Introduction  WCF Definition  WCF Architecture  Implementation  WCF Demo Overview.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
Latest techniques and Applications in Interprocess Communication and Coordination Xiaoou Zhang.
Windows Communication Foundation and Web Services.
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
Copyright © 2007 CA. All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 5C The Plex SOA Strategy.
Darryl Burling Developer Evangelist Microsoft The age of connected applications Whats new in VS2008 WCF Background: WS*,.Net 3.0 and WCF ABC’s & improvments.
Adam Dille CS526 – Spring  Advances in Microsoft’s service offerings  ASMX vs. WCF  Latest WCF Improvements (.NET 4.0)  No in-depth study of.
The Microsoft Technical Roadshow 2006 Windows Communication Foundation Mike Taulty Developer & Platform Group Microsoft Ltd
Module 13: WCF Receive Adapters. Overview Lesson 1: Introduction to WCF Receive Adapters Lesson 2: Configuring a WCF Receive Adapter Lesson 3: Using the.
Getting Started with Windows Communication Foundation 4.5 Ed Jones, MCT, MCPD, MCTS Consultant RBA Inc.
WCF Services in Nutshell A Tutorial using WCF Mr. Michael Arnwine WCF using Service Oriented Architecture (SOA) and “Restful” Service.
Bruno Terkaly | Technical Evangelist Bret Stateham | Technical Evangelist.
Introduction SOAP History Technical Architecture SOAP in Industry Summary References.
Copyright ©2004 Virtusa Corporation | CONFIDENTIAL Introduction to Windows Communication Foundation Ruwan Wijesinghe.
[Title of the course] WCF
Agenda What Is the Windows Communication Foundation? How Does It Work? How Do I Use and Deploy It? Bindings Addresses Contracts How to host WCF services.
C Copyright © 2009, Oracle. All rights reserved. Appendix C: Service-Oriented Architectures.
1 Windows Communication Foundation: Integrating COM+ and MSMQ Applications Andy Milligan COM305 Program Manager Microsoft Corporation.
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Intro to WCF From the beginning and uses Steve AppRochester.
Random Logic l Forum.NET l Web Services Enhancements for Microsoft.NET (WSE) Forum.NET ● October 4th, 2006.
A Deep Dive into Best Practices with the Windows Communication Foundation John Justice COM415 Program Manager Microsoft Corporation.
Developing Web Services Using ASP.NET and WSE That Interoperate with the Windows Communications Foundation ("Indigo") Mark Fussell COM432 Lead Program.
.NET Enterprise Services COM+ 1.5 麥超俊 Bobby Mak 架構技術推廣經理開發工具暨平台推廣處台灣微軟股份有限公司.
Mahesh Krishnan, Senior Consultant, Readify Slide 1.
Telerik Software Academy Web Services & Cloud.
Introducing the ABCs of Windows Communication Foundation | Feb 2006 rickgaribay.net Windows Communication Foundation Hosting & Endpoints Winter 2006.
XML and Web Services (II/2546)
2 Productive Windows Communication Foundation Jeremy Boyd Mindscape MSDN Regional Director – New Zealand SOA315.
INT-9: Implementing ESB Processes with OpenEdge ® and Sonic ™ David Cleary Principal Software Engineer.
Kemal Baykal Rasim Ismayilov
Windows Communication Foundation David Anderson Independent Software Developer DCOM Productions.
Presentation 24: Windows Communication Foundation Introduced Objektorienteret Netværkskommunikation.
Agenda What Is the Windows Communication Foundation? How Does It Work? How Do I Use and Deploy It? Bindings Addresses Contracts How to host WCF services.
.NET Mobile Application Development XML Web Services.
Introduction to Web Services Presented by Sarath Chandra Dorbala.
Dhananjay Kumar MVP-Connected System 1. WCF  Agenda What is WCF ? Why WCF? Address, Binding, Contract End Points Hosting Message Patterns Programming.
07 | Advanced WCF Topics Bruno Terkaly | Technical Evangelist Bret Stateham | Technical Evangelist.
Shani Raba Team Leader & Software Architect
OE-NIK HP Advanced Programming WCF WCF SOAP service, host, client Exception handling (NOT required)
Windows Communication Foundation Stipe Ivan Latković.
O VERVIEW OF SOA AND WCF Jinaldesai.net – My Thouths And Learnings.
Windows Communication Foundation. Agenda How We Got Here ASMX vs WCF Throwdown WCF Contracts Service Data Message Bindings Security Reliability Declarative.
Windows Communication Foundation and Web Services
Windows Communication Foundation
4/12/2018 2:37 PM Windows Communication Foundation: Migration, interop, upgrade, and integration Risman Adnan ISV Lead, Microsoft Indonesia
Windows Communication Foundation
Windows Communication Foundation
Sabri Kızanlık Ural Emekçi
Window Communication Foundation
WEB SERVICES.
WCF.
Windows Communication Foundation (WCF)
Windows Communication Foundation and Web Services
Introduction to Web Services and SOA
Windows Communication Foundation (WCF)
Distributed System using Web Services
Introduction to Web Services and SOA
Distributed Applications on Windows Vista
Distributed System using Web Services
Presentation transcript:

Getting Started with WCF Windows Communication Foundation 4.0 Development Chapter 1

2 Contents 1. WCF and SOA essentials 2. WCF architecture 3. Service hosting and communication

3 1. WCF and SOA essentials What is WCF? WCF versions What is a service? SOA (service-oriented architecture) Benefits of SOA

4 What is WCF? WCF is Microsoft's unified API for creating service-oriented applications WCF provides a run-time environment for services Enables you to expose and consume CLR types as services WCF implements industry standards, to promote interoperability between services Service interactions Type conversions Marshalling Protocol support

5 WCF Versions WCF 3.* (in.NET Framework 3.*) Hosting services Service instance management Asynchronous calls Reliability Transaction management Disconnected queued calls Security WCF 4.0 (in.NET Framework 4.0) Simplified configuration Discovery Routing service REST (representational state transfer) improvements Windows Workflow services

6 What is a Service? A service provides a specific function Typically a business function, such as processing a purchase order A service can provide a single discrete function E.g. converting one type of currency into another … or it can perform a set of related business functions E.g. handling the various operations in an airline reservations system

7 SOA (Service-Oriented Architecture) A service-oriented architecture (SOA) is... An information technology approach or strategy in which applications make use of (rely on) services available in a network such as the Web In SOA, an application can be… A UI that calls services A long-running workflow (e.g. WF) that makes use of services A portal that uses services Application Service

8 Benefits of SOA Alignment with business process Define services to implement the business process Services can deliver business benefit quicker Reuse and productivity Reuse coarse-grained services in many applications Hopefully achieve developer productivity Interoperability and flexibility Services can be interoperable across platform and languages

9 SOA, Web Services, and WCF SOA != Web services SOA is an architectural strategy Web services are an implementation technology, based on HTTP You don't have to use Web services to implement an SOA WCF supports SOA Provides tools to enable you to create and consume services Supports many transport protocols (HTTP, TCP, IPC, MSMQ) No need to learn WSDL

10 2. WCF Architecture Service execution boundaries Endpoints: A, B, C Addresses Bindings Contracts

11 Service Execution Boundaries A client never interacts directly with a service The client always uses a proxy to forward calls to the service The proxy exposes the same operations as the service WCF allows communication over all execution boundaries: In same app domain In a different app domain In a different process (on same or different machine) Svc Pr Client AppDomain1 Client AppDomain2 Process A Client Process B Same machine, or intranet, or Internet Pr

12 Endpoints: A, B, C A locatable service is known as an "endpoint" AddressBinding Contract Address Where to find a service (i.e. a URL) Binding How to communicate with a service (e.g. HTTP) Contract What the service can do (a set of operations)

13 A is for Address Every service is associated with a unique address Address defines location and transport protocol ("schema") General format of addresses: [transport] :// [machine] [:optional port] / [optional URI] WCF supports the following transport schemas: Transport HTTP TCP IPC MSMQ Example address net.tcp://servername:8002/MyService net.pipe://localhost/MyPipe net.msmq://servername/MyService Additional notes Default port 80 (443 for HTTPS) Default port 808 Must use localhost (or its name) Can use private queues too base address

B is for Binding A binding specifies low-level communication details Transport protocol Message encoding Reliability, security, transaction propagation, and interoperability WCF has several predefined bindings, for example: Name BasicHttpBinding NetTcpBinding Transport HTTP/HTTPS TCP NetNamedPipeBinding WSHttpBinding IPC HTTP/HTTPS WSDualHttpBinding NetMsmqBinding HTTP MSMQ Encoding Text, MTOM Binary Text, MTOM Binary When to use… Expose WS as legacy ASMX WCF client (cross-machine) WCF client (in-process) Non-WCF client Non-WCF client (bidirectional) WCF client (disconnected)

15 C is for Contract A contract defines the callable operations for a service [ServiceContract] Exposes a.NET type (class or interface) as a WCF contract [OperationContract] Exposes a method in a WCF service Note: you can only annotate methods (not properties or indexers!) [DataContract] Designates a type as being usable as a service param/return Simple example: [ServiceContract(Namespace="urn:myNamespace")] interface ITempConverter { [OperationContract] double CtoF(double c); [OperationContract] double FtoC(double f); } [ServiceContract(Namespace="urn:myNamespace")] interface ITempConverter { [OperationContract] double CtoF(double c); [OperationContract] double FtoC(double f); }

16 3. Service Hosting and Communication Hosting overview Hosting options Packaging strategies Communicating with a service

17 Hosting Overview A service must be hosted in a Windows process A process can host many services Technically speaking, to host a service: You must create an instance of the ServiceHost class A ServiceHost instance is capable of hosting one type of service You configure the ServiceHost instance, so it knows what it's hosting

18 Hosting Options Options for providing a host process: IIS 5/6 Convenient and easy, IIS manages the lifecycle of the service Only supports the HTTP protocol Windows Activation Service (WAS) System service, part of IIS 7 in Vista/Windows 7 and Windows Server 2008 (can also be installed separately) Not limited to the HTTP protocol Automatic support for pooling, identity management, and isolation Managed application (known as "self-hosted") Console application, Windows service, Windows Forms, or WPF application You manage the lifecycle of the service Flexible but manual

19 Packaging Strategies Simplest packaging strategy: Define a single class for the contract, implementation, and host Not recommended! A better packaging strategy: Define interface and implementation as separate types Define service and host as separate assemblies/projects Contract (interface) Implementation (class) WCF Service Library Configuration Host code WCF Service Host

20 Communicating with a Service Clients communicate with a service via messages Message passes through a series of channels at client and server Channels are interceptors that perform a specific task (encoding, passing security context, propagating transaction context, etc.) The "transport channel" sends/receives message over transport Transport channel Channel WCF dispatcher Channel Business endpoints Service Metadata Exchange (MEX) endpoint Transport channel Channel Proxy Client

21 Summary WCF and SOA essentials WCF architecture Service hosting and communication