KEMBAR78
WCF Introduction | PPTX
WCF Introduction
ARCOM - KSA
Agenda
 What is WCF
 From object to service
 SOA , ESB
 ASMX & WCF
 WCF architecture
 Ways of talk [Client – Service]
 Service Provider , Consumer
 ABC’s of WCF
 Hosting WCF
 Advantage , Disadvantages
 Demos
ARCOM-KSA
2
What is WCF?
ARCOM-KSA
3
 Stands for Windows Communication Foundation
 Microsoft’s unified programming model (the service model) for building Service-
Oriented [SOA] apps
From Objects to Services
Polymorphism
Encapsulation
Subclassing
Message-based
Schema+Contract
Binding via Policy
1980s
2000s
Interface-based
Dynamic Loading
Runtime Metadata
1990s
Object-Oriented
Service-Oriented
Component-Based
ARCOM-KSA
4
What’s SOA - ESB
 software architecture model
 used for designing and implementing the
interaction between mutually interacting
software applications in (SOA)
ARCOM-KSA
5
 software design and software architecture design pattern
 discrete pieces of software application functionality as services
 A service is a self-contained unit of functionality
SOA (service oriented architecture)
ESB (Enterprise Service Bus)
ARCOM-KSA
ASMX is limiting WCF is powerful
6 ASMX & WCF
 Xml web services
 HTTP-only hosting in IIS
 No support for security
 Advanced scenarios require mixing
models
 highly configurable and highly extensible
 supports what ASMX cannot
 supports a unified programming model
across all protocols
Service Model
Programming Model
WCF Architecture
ARCOM-KSA
7
Ways to Talk
One Way
Request-Reply
Duplex (Dual)
ARCOM-KSA
8
Client Service
 One Way: Datagram-style delivery
 Request-Reply : Immediate Reply on same logical thread
 Duplex Reply : “later” and on backchannel (callback-style)q
ARCOM-KSA
9 Service Provider , Consumer
A B C
ARCOM-KSA
10 ABC’s of Life Service
ServiceClient
Address, Binding, Contract [WCF]
A
d
d
r
e
ARCOM-KSA
11
ABC
A B C
A B C
Message
Address Where the service is
Binding How to talk to the service
Contract What the service can do
ABC’s Cont. [Address]
ARCOM-KSA
12
 Combination of transport, server name, port & path
 Transport is determined by the binding
 Examples
http://localhost:8001
net.tcp://localhost:8002/MyService
net.pipe://localhost/MyPipe
net.msmq://localhost/private/MyService
net.msmq://localhost/MyService
A
ABC’s Cont. [Bindings]
ARCOM-KSA
13
 Transport
HTTP
TCP
MSMQ
 Message formats and encoding
Plain text
Binary
Message Transmission Optimization Mechanism (MTOM)
 Communication security
No security
Transport security
Message security
B
ABC’s Cont. [Contracts]
Service
Contract
Defines Operations,
Behaviors and
Communication Shape
What does your
service do
Data
Contract
Defines Data entities
and parameter types
What object data is
used
Message
Contract
Allows defining
application-specific
headers and
unwrapped body
content
Allows control over the
SOAP structure of
messages
Fault
Contract
Defines error types
ARCOM-KSA
14
C
ARCOM-KSA
15
 IIS / Azure (ASP.NET project)
 Windows Services
Hosting WCF Services
Demos
ARCOM-KSA
16
 Hello WCF
 Edit WCF Configuration
 Add services
 Add end points
 Binding configuration
 Consume WCF
 Service Reference
 Using Code First
 WCF Using UML [Class Diagram]
 WCF Architecture Code
 Service
 Service.Contracts
 Service.Business
Advantage
ARCOM-KSA
17
 You can create new components for security, transport, authentication.
 No much change in code for implementing the security model ,, Small changes in the
configuration will make your requirements.
 Its faster than ASMX
 Its Interoperability, for java, and more.
 WCF is interoperable with other services
 WCF services provide better reliability and security.
Disadvantage
ARCOM-KSA
18
 WCF is Microsoft's implementation of SOA its APIs are solely controlled by MS which
makes interoperability a bit difficult.
 deploy WCF apps, need more underlying hardware
Thank You ..|
ARCOM-KSA
19

WCF Introduction

  • 1.
  • 2.
    Agenda  What isWCF  From object to service  SOA , ESB  ASMX & WCF  WCF architecture  Ways of talk [Client – Service]  Service Provider , Consumer  ABC’s of WCF  Hosting WCF  Advantage , Disadvantages  Demos ARCOM-KSA 2
  • 3.
    What is WCF? ARCOM-KSA 3 Stands for Windows Communication Foundation  Microsoft’s unified programming model (the service model) for building Service- Oriented [SOA] apps
  • 4.
    From Objects toServices Polymorphism Encapsulation Subclassing Message-based Schema+Contract Binding via Policy 1980s 2000s Interface-based Dynamic Loading Runtime Metadata 1990s Object-Oriented Service-Oriented Component-Based ARCOM-KSA 4
  • 5.
    What’s SOA -ESB  software architecture model  used for designing and implementing the interaction between mutually interacting software applications in (SOA) ARCOM-KSA 5  software design and software architecture design pattern  discrete pieces of software application functionality as services  A service is a self-contained unit of functionality SOA (service oriented architecture) ESB (Enterprise Service Bus)
  • 6.
    ARCOM-KSA ASMX is limitingWCF is powerful 6 ASMX & WCF  Xml web services  HTTP-only hosting in IIS  No support for security  Advanced scenarios require mixing models  highly configurable and highly extensible  supports what ASMX cannot  supports a unified programming model across all protocols
  • 7.
    Service Model Programming Model WCFArchitecture ARCOM-KSA 7
  • 8.
    Ways to Talk OneWay Request-Reply Duplex (Dual) ARCOM-KSA 8 Client Service  One Way: Datagram-style delivery  Request-Reply : Immediate Reply on same logical thread  Duplex Reply : “later” and on backchannel (callback-style)q
  • 9.
  • 10.
    A B C ARCOM-KSA 10ABC’s of Life Service
  • 11.
    ServiceClient Address, Binding, Contract[WCF] A d d r e ARCOM-KSA 11 ABC A B C A B C Message Address Where the service is Binding How to talk to the service Contract What the service can do
  • 12.
    ABC’s Cont. [Address] ARCOM-KSA 12 Combination of transport, server name, port & path  Transport is determined by the binding  Examples http://localhost:8001 net.tcp://localhost:8002/MyService net.pipe://localhost/MyPipe net.msmq://localhost/private/MyService net.msmq://localhost/MyService A
  • 13.
    ABC’s Cont. [Bindings] ARCOM-KSA 13 Transport HTTP TCP MSMQ  Message formats and encoding Plain text Binary Message Transmission Optimization Mechanism (MTOM)  Communication security No security Transport security Message security B
  • 14.
    ABC’s Cont. [Contracts] Service Contract DefinesOperations, Behaviors and Communication Shape What does your service do Data Contract Defines Data entities and parameter types What object data is used Message Contract Allows defining application-specific headers and unwrapped body content Allows control over the SOAP structure of messages Fault Contract Defines error types ARCOM-KSA 14 C
  • 15.
    ARCOM-KSA 15  IIS /Azure (ASP.NET project)  Windows Services Hosting WCF Services
  • 16.
    Demos ARCOM-KSA 16  Hello WCF Edit WCF Configuration  Add services  Add end points  Binding configuration  Consume WCF  Service Reference  Using Code First  WCF Using UML [Class Diagram]  WCF Architecture Code  Service  Service.Contracts  Service.Business
  • 17.
    Advantage ARCOM-KSA 17  You cancreate new components for security, transport, authentication.  No much change in code for implementing the security model ,, Small changes in the configuration will make your requirements.  Its faster than ASMX  Its Interoperability, for java, and more.  WCF is interoperable with other services  WCF services provide better reliability and security.
  • 18.
    Disadvantage ARCOM-KSA 18  WCF isMicrosoft's implementation of SOA its APIs are solely controlled by MS which makes interoperability a bit difficult.  deploy WCF apps, need more underlying hardware
  • 19.

Editor's Notes

  • #7 Differences Between ASMX and WCF Services http://msdn.microsoft.com/en-us/library/ff648181.aspx
  • #11 خدمه نقل التكاتك العطلانه Address : مكان الي هوصلك ليه Binding : طريقه التوصيل Contract : هتدفع كام – هتمشي من شارع ايه – هتمشي بسرعه ايه - - اشغلك ايه في الرادي