Welcome to BARMAGY Sign in | Join | Help

WCF 101: First things First

Before digging into Windows Communication Foundation I think it's a good idea to start with the SOA and its related concepts…

     

What is SOA

As per W3C the service oriented architecture is "A set of components which can be invoked and whose interface descriptions can be discovered and published"

     

SOA principals

To be able to design and develop a service oriented applications you need to understand the four SOA basic principals which is:

  • Explicit boundaries:

    Messages must cross applications (services) regardless what's behind..

  • Autonomous services

    Simply make each service totally independent regarding its development and deployment (loosely coupled) …

  • Policy based compatibility

    Communication with a specific service comes through its policies regarding security, messaging pattern... etc

  • Shared Schemas and contracts

    Services publish information about the operations that they implement and the structure of the data that they expect to send and receive…

     

What is a service?

A service is a set of functionality that can be invoked by sending and receiving messages..

     

What is WCF?

To understand what WCF really is, you need to give a look back to Microsoft disconnected technologies.. ASMX, .NET Remoting, Enterprise Services and COM+. Because WCF is the new age technology to replace them… read more here

     

WCF architecture

Your WCF application runs above the following four layers:

   Read more here

WCF service architecture

By default any WCF service consists of a service description (mostly using WSDL) and one or more endpoints.. read more about WCF service architecture

     

What is a message?

A message is a packet of data that is being routed from source to a destination.

     

Soap message structure

SOAP messages .. so Soap messages are structured as follow:

And basically contains the following 3 sections:

  • SOAP Envelope
    the root element in every SOAP message, and contains two child elements, an optional Header and a mandatory Body.
  • SOAP Header
    optional sub-element of the SOAP envelope, and is used to pass application-related information that is not directly related to message content.. think about authentication information, routing data, correlation .. etc
  • SOAP Body

    mandatory sub-element of the SOAP envelope and contains the message data.

Read more here

 Also note that WCF messages are not just SOAP or XML.. it could be JSNO or even binary files.

Contracts

Contracts defines certain aspects of the service such as format and structure .. and consists of 3 types:

  • Service contracts: defines operations on the service ( web methods in ASMX terminology)
  • Message contracts: allows the control of SOAP message data and structure
  • Data contracts: defines the data that is being exchanged between a service and its client

Watch this webcast for more information about WCF contracts

     

Binding

Binding defines how a service communicate with the outside world.. binding properties contains information just like transport pattern, messaging pattern and security pattern.

     

Addresses

Addresses defines a service endpoint location .. remember each single service may contain multiple endpoints and multiple addresses as well, addresses may use http, tcp, MSMQ or named pipes address.

     

HTH and happy coding :)

     

     

   

Published Sunday, November 25, 2007 4:33 AM by Ahmed adly

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Tuesday, November 27, 2007 5:10 PM by Happy Coding :)

# WCF 101: Contracts

One of the major advantages of WCF is the separation between a service contract and a service implementation.....
Saturday, May 14, 2011 1:16 PM by Trish

# re: WCF 101: First things First

Very true! Makes a change to see sonemoe spell it out like that. :)
Sunday, May 15, 2011 5:53 PM by Joeie

# re: WCF 101: First things First

That's raelly thinking out of the box. Thanks!
Wednesday, September 14, 2011 8:25 AM by dIcencerab

# unlock iphone 4 3m

unlock iphone 4
how to unlock iphone 4
   
   
<a href="http://theunlockiphone4.com">unlock">http://theunlockiphone4.com">unlock iphone 4</a> unlock iphone 4 unlock iphone 4                    
unlock iphone 4                
                 
how to unlock iphone 4 unlock iphone 4  [url=http://theunlockiphone4.com]unlock iphone 4 [/url] unlock iphone 4
Tuesday, January 10, 2012 6:06 AM by Neobarkak

# unlock iphone 4 swiscifoli

Systems for Unlock Iphone 4 gr Anybody who has an apple iphone must are usually shown to you personally they usually must have unlock iPhone 4 r points, commonly in connection with specific computer programs that is certainly all at once safe.However, perhaps it's pretty infuriating to enable you to unlock your i phone fantastic look for a completely new apple iphone4 eliminating the attach upon application form.There are numerous of promotions almost everywhere, in spite of this, minus individual learning you can get, absolutely contained, subsequently there are several options a few great bucks involving almost nothing.                          
[url=http://www.unlockiphone4tut.com]unlock iphone 4[/url]

What do you think?

(required) 
required 
(required)