Home > Microsoft .Net Development Tips > .NET Architecture > Beginning Windows Communication Foundation development, Part 1
Win Development Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

.NET ARCHITECTURE

Beginning Windows Communication Foundation development, Part 1


Brian Eastwood, Site Editor
09.01.2006
Rating: --- (out of 5)


.NET Essentials Channel
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Microsoft's Windows Communication Foundation is a new loosely coupled tool for building distributed systems. The idea is that a better messaging system leads to improved architecture, faster data processing and greater scalability.

WCF replaces five existing Microsoft technologies -- ASP.NET Web Services (ASMX), .NET Remoting, Enterprise Services/COM+, Web Services Enhancements and the Microsoft Message Queue -- and stands as one of the major pillars of .NET 3.0. It is no surprise, then, that developers everywhere have been playing with WCF for months and developed best practices for working with it. Here we offer a sampling of tutorials and blog posts about Windows Communication Foundation that we have seen in recent weeks. As always, if there are resources that you would like to share, send us an e-mail and we will add it to the list.

Messaging basics: A good start is MSDN's Introduction to Reliable Messaging with WCF by Clemens Vasters, a community program manager on the WCF team. Vasters focuses on how Windows Communication Foundation allows application developers to align their messaging sessions with the WS-ReliableMessaging specification.

"[T]he implementation of reliable messaging [is] a mere matter of picking the right binding configuration for a service and service client, [but] it is certainly useful to have a bit of an idea of what's going on behind the scenes and on the wire," he writes. From there, Vasters describes the characteristics of a reliable messaging session, lists the configuration properties of a session's binding elements and covers the types of bindings that Windows Communication Foundation provides for reliable messaging. (The binding is one element of WCF's "ABC" messaging model, in which developers write a contract, define a service binding and bind the contract to an address.)

Versioning: Another WCF group member, Craig McMurtry, has posted a handy tutorial called Versioning


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Web services and SOA implementations in the .NET Framework
Microsoft "WebSphere Loves Windows" ads tout cost, performance vs. AIX
Microsoft releases new CTP of Oslo SDK
Microsoft's Oslo modeling platform, the M language and .NET
Outgoing Bill Gates says UML on tap in Oslo SOA modeler
Podcast: Windows CardSpace authors speak
Open XML SDK ready for the road
Some of the Zen of Volta
Scaling WCF applications can challenge development teams
Security interoperability with .NET/WSE and WebLogic Workshop 8.1
Book excerpt: Hands-on Windows Communication Foundation

.NET Architecture
Microsoft's Oslo modeling platform, the M language and .NET
Introduction to ASP.NET's Model View Controller (MVC) Design Pattern
Free book from Microsoft brings patterns and practices to .NET
A look at concurrency constructs and primitives in .NET
Designing Windows Communication Foundation service contracts
Book excerpt: Java EE and .NET security interoperability
Book excerpt: .NET Framework Design Guidelines
Book Excerpt: Executing activities in Windows Workflow Foundation
Aspect-oriented programming (AOP) and the .NET Framework
Book excerpt: Hands-on Windows Communication Foundation

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
scripting language  (SearchWinDevelopment.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


WCF Services. Here McMurtry covers what developers should keep in mind if they plan to modify a service. The plan varies depending on whether modification means adding a new operation, changing an existing operation or changing the data contract that is part of an existing operation, McMurtry notes.

The only breaking change involved in modifying services is retiring old endpoints. "To make it easier to retire endpoints, you should include a default operation for every service contract that you ever define, and you should specify that operation can throw a fault indicating that the endpoint has been retired," McMurtry notes. "The information provided with the fault can direct the client to the metadata for the replacement endpoints."

Serialization: Along with versioning, serialization is a key consideration when working with Windows Communication Foundation. Serialization, the process of mapping between .NET objects and XML Infosets, should be familiar to ASMX users, Aaron Skonnard writes in the MSDN article Serialization in WCF. One major difference, though, is that WCF offers three serializers. In addition to the XmlSerializer that is included in ASMX, there is the DataContractSerializer, which can operate on any .NET type annotated with either the [DataContract] or [Serializable] attributes, and the NetDataContractSerializer, which serializes .NET type information into XML. Each serializer has a proper place, Skonnard writes:

Security: Any time information is going across the wire, security is a concern. The model for securing bindings in Windows Communication Foundation is based on confidentiality (encrypted messages), integrity (a check on a message's content) and authentication, Keith Brown writes in the MSDN article Security in WCF. First, developers must decide whether to provide security at the transport level or at the message level. Then the credential level for client and service must be considered. There are five options for credentials -- None, UserName, Windows, Certificate and IssueToken, the latter of which incorporates Windows CardSpace identity management technology. These considerations, in part, will determine which of the three WCF binding types should be used, Brown notes.

Cancelling streams: No system is perfect, so there will be times when a message has to be cancelled mid-transmission. There are several ways to do this -- some good and some not so good -- Nicholas Allen of the WCF team writes in the blog entry Cancelling Streams. Aborting the stream is quick, but it's not painless, since a connection needs to be reestablished and there is no record of why the message was aborted. Sending a fault message does not help either, since the client creates that after the original message has been sent. Ultimately, Allen says, developers should use both a data channel and a control channel: "Using a layered channel would allow you to remove the logic for establishing the control connection from the application and would eliminate the need to define the control operation contracts by hand."

Rate this Tip
To rate tips, you must be a member of SearchWinDevelopment.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Database Programming Solutions - .NET XML, Visual Studio LINQ, ORM .NET
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts