Windows Communication Foundation
         (WCF) - Part 2




                             Jaliya Udagedara
                                              MCPD
              http://www.jaliyaudagedara.blogspot.com/
What are we going to discuss today?
• The Basic Composition of a WCF Application
• The ABC's of WCF
The Basic Composition of a WCF
Application
• WCF Service assembly
• WCF service host
• WCF client
The ABC's of WCF
• Address
• Binding
• Contract



              Endpoint
    Address    Binding   Contract
    Where      How       What
The ABC's of WCF : Address
• Where to find the service



    http://ravana:3333/myservice.svc/basic
             Scheme: http:

             Machine: ravana

             Port (optional): 3333

             Path: /myservice.svc/basic
The ABC's of WCF : Binding
• Defines the Transport protocol, Encoding and Security for
  communication.
• Variety binding types are available out of the box under
  WCF programming model.
   • basicHttpBinding
   • wsHttpBinding
   • netTCPBinding
The ABC's of WCF : Contract
• Describes what the service does.
   • Service Contracts
      • ServiceContract - Defines the Interface.
      • OperationContract - Defines the methods inside Interface.

   • Data Contracts
      • DataContract - Used to define the class
      • DataMember - Used to define the properties.

   • Fault Contracts
   • Message Contracts
DEMO
Thank You!

Windows communication foundation (part2) jaliya udagedara

  • 1.
    Windows Communication Foundation (WCF) - Part 2 Jaliya Udagedara MCPD http://www.jaliyaudagedara.blogspot.com/
  • 2.
    What are wegoing to discuss today? • The Basic Composition of a WCF Application • The ABC's of WCF
  • 3.
    The Basic Compositionof a WCF Application • WCF Service assembly • WCF service host • WCF client
  • 4.
    The ABC's ofWCF • Address • Binding • Contract Endpoint Address Binding Contract Where How What
  • 5.
    The ABC's ofWCF : Address • Where to find the service http://ravana:3333/myservice.svc/basic Scheme: http: Machine: ravana Port (optional): 3333 Path: /myservice.svc/basic
  • 6.
    The ABC's ofWCF : Binding • Defines the Transport protocol, Encoding and Security for communication. • Variety binding types are available out of the box under WCF programming model. • basicHttpBinding • wsHttpBinding • netTCPBinding
  • 7.
    The ABC's ofWCF : Contract • Describes what the service does. • Service Contracts • ServiceContract - Defines the Interface. • OperationContract - Defines the methods inside Interface. • Data Contracts • DataContract - Used to define the class • DataMember - Used to define the properties. • Fault Contracts • Message Contracts
  • 8.
  • 9.

Editor's Notes

  • #4 Speaker Notes:Object OrientedInheritancePolymorphismAbstractionComponent BasedComponents : Objects not classesCommunicate though InterfacesEncapsulationSubstitutable : Classes that implements the interfaces can be replaced. (Component B can immediately replace component A, if component B provides at least what component A provided and uses no more than what component A used)Serialization : Store objects or Pass objects from one place to other
  • #5 Speaker Notes:Object OrientedInheritancePolymorphismAbstractionComponent BasedComponents : Objects not classesCommunicate though InterfacesEncapsulationSubstitutable : Classes that implements the interfaces can be replaced. (Component B can immediately replace component A, if component B provides at least what component A provided and uses no more than what component A used)Serialization : Store objects or Pass objects from one place to other
  • #6 Speaker Notes:Object OrientedInheritancePolymorphismAbstractionComponent BasedComponents : Objects not classesCommunicate though InterfacesEncapsulationSubstitutable : Classes that implements the interfaces can be replaced. (Component B can immediately replace component A, if component B provides at least what component A provided and uses no more than what component A used)Serialization : Store objects or Pass objects from one place to other
  • #7 Speaker Notes:Object OrientedInheritancePolymorphismAbstractionComponent BasedComponents : Objects not classesCommunicate though InterfacesEncapsulationSubstitutable : Classes that implements the interfaces can be replaced. (Component B can immediately replace component A, if component B provides at least what component A provided and uses no more than what component A used)Serialization : Store objects or Pass objects from one place to other
  • #8 Speaker Notes:Object OrientedInheritancePolymorphismAbstractionComponent BasedComponents : Objects not classesCommunicate though InterfacesEncapsulationSubstitutable : Classes that implements the interfaces can be replaced. (Component B can immediately replace component A, if component B provides at least what component A provided and uses no more than what component A used)Serialization : Store objects or Pass objects from one place to other