Start Development with Windows Communication Foundation
page 3 of 6
by Keyvan Nayyeri
Feedback
Average Rating: 
Views (Total / Last 10 Days): 33984/ 52

Programming Model

In WCF programming we frequently deal with some concepts such as Service Contract, Data Contract, Message Contract and Service Operation on the service side.

Each of these concepts has a corresponding concept in object oriented programming and we will use them to implement our WCF concepts.  Usually we use an Object Oriented concept and mark it with an attribute to build our WCF concept.

These are some examples: Service Contract, Data Contract and Message Contract are implemented as interface.  For Service Contract we use ServiceContract, for Data Contract we use DataContract and for Message Contract we use MessageContract attributes.

In previous articles I mentioned that there are three approaches in WCF programming:

·         Declarative

·         Imperative

·         Configuration Based

And also I mentioned that normally we use a combination of these three approaches to build our WCF applications.

The declarative part of WCF programming is where we mark our classes, methods and interfaces with attributes to build WCF concepts.  Imperative part is where we write programming code logic for our applications and Configuration is where we configure our applications, define service endpoints, behaviors, etc.

We have three levels of programming in WCF (from top to down):

·         Typed Services: We write services like our Object Oriented applications and use methods and functions to get parameters and return results in simple and complex data types.

·         Untyped Services: We write services to use messages as parameters and returns types rather than simple or complex types.

·         Messaging-Layer: In this level we come down to the lowest level and directly work with messages.  Here you need to code for many details of your application.  One common example of this level is writing intermediaries.

Well, I think theories are getting boring.  Let us discover our example to cover much of these theories.


View Entire Article

User Comments

Title: Good Article for all   
Name: Balu
Date: 2010-12-14 7:31:21 AM
Comment:
Hi,

This article is very clear in concepts and implementations. This can be easily understandable for beginners also.

Very useful!

Thanks
Title: Thank You   
Name: Safiya P
Date: 2010-08-12 8:23:13 AM
Comment:
Keep posting arcles like this on new technologies. As a beginer, your articles really helped me to get the foundation. Thank You.
Title: Very useful for beginners   
Name: Elizabeth
Date: 2010-08-06 4:57:10 AM
Comment:
Thank you so much....
Title: Very useful   
Name: sudheer
Date: 2010-04-01 4:41:31 AM
Comment:
thnks a lot was very useful
Title: Very Useful article especially to the beginner   
Name: kurt
Date: 2009-11-09 2:01:20 AM
Comment:
Very Useful article especially to the beginner
Title: Very Very Good   
Name: Pankaj Lahoti
Date: 2008-08-07 5:02:54 AM
Comment:
Hai (all wcf),
Its very Clear and Understandable Steps.
hopefully find more Article near Future...10x in adv
Title: start WCF   
Name: Adrian
Date: 2008-03-27 3:19:10 PM
Comment:
very clear, thanks

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-03-28 8:08:54 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search