Sunday, January 21, 2007

Connecting Applications with WCF

Brian Noyes presented on Window Communication Foundation (WCF) to the Capitol .NET User Group. He said that WCF is designed around services orientation. I asked if services orientation was the same as SOA and Noyes replied not necessarily, adding that there was some debate on the precise definition of SOA.

Noyes listed the needs of a services oriented world: the need to connect clients to back-end services, the need to be decoupled from the specific service technology/calling patterns, and the need to support distributed system capabilities (service hosting, instance management, reliability, async communications, transactions, and security).

WCF is a framework for connecting distributed applications. It is part of .NET 3.0 and enables building SOA applications. WCF implements Web Security (WS) standards. It has a single API that supports .NET remoting, asp.NET web services, enterprise services & communications, and MSMQ.

.NET has messaging systems at its core, SOAP messages (not necessarily XML/Text). Clients and services communicate through endpoints. Endpoints consist of address (where), binding (how), and contract (what).

Noyes compared it to a phone call: the number to be dialed (address), the language and grammar & syntax (binding), and what you are going to say (contract).

He walked through the WCF address process: the location of a web service, that is, the URL (protocol, server domain, port, and service URI (optional). For example, you could have multiple logical services off of the same port.

Noyes compared WCF Bindings elements to Lego blocks. He described bindings as the brains of communications, encapsulating what happens on the wire. Bindings determine the wire level protocol, communications patterns, message format, security, transactions, and reliability. Bindings can be extracted out of code and put into config.

Noyes characterized bindings as SOAP on a wire.” WCF defines nine standard bindings. They are compatible with: Basic, TCP, Peer TCP, Named Pipe, and Web Security (WS). Noyes said the bindings were pre-configured but can be tweaked. Standard bindings can be customized, or developers can define custom bindings.

A member of the audience asked, “What is card space?” Noyes replied that it was a new identity subsystem, which can manage multiple passwords, user name/password, WSSy, and DIME.

Noyes described the kinds of WCF Contracts: services contracts (operations exposed by the service), data contracts (what data is passed through the service operations), message contracts, and fault contracts.

He explained that service contracts are defined as an attribute of Type via .NET interface. The .NET interface can go down to the WSDC level but doesn’t have to. For security reasons, nothing is exposed unless specified; the default settings are all set to “opt in.” (This suggests to this observer that Microsoft has finally internalized the necessity of building security into its software.)

To implement a service type, implement a service contract interface. This does not require WCF specifics for basic communication. Clients are connected via a WCF proxy, and the proxy exposes service contract methods. Passing data is based on data contracts; best practice is to define data contracts for custom types used in the service contract. (My notes indicate using SPUtil to implement data contracts.)

Noyes said that interoperability is mostly addressed through message contracts.

He ended the presentation with a brief overview of WCF’s advanced capabilities: asynchronous calls, call back, sessions (Noyes indicated this doesn’t go well with transactions), security, reliability, queuing, transactions, and peer to peer.

Connecting Applications with WCF - Slides and demos

WCF Master Class

A Developers Guide to Deploying Windows Forms Applications by Brian Noyes

1 comment:

Anonymous said...

Alice, thanks a bunch for sharing your excellent report with the world, on your blog. I posted a link at http://xml.gov/documents/completed.asp

With reference to the question of how to create incentives and provide credit for sharing information, I hope FIRM's forum at FOSE will make some small contribution toward that end. See
http://xml.gov/documents/completed/firm/ & FIRMForumFOSE07Announcement.htm &
http://xml.gov/draft/FIRMForumFOSE07.htm (I also hope that NCC-AIIM
will cosponsor the forum.) BTW, with reference to the CFP, please
let me know if you'd like to play any role in the forum. At least
it would be great to see you there. Nongov folks can attend for free by citing the priority code listed in the announcement.

Regarding Al Linden's question about a "standard PMO," if he was
referring to a PMO for a standard (as opposed to a model PMO for any
kind of program), one way to start the process would be to use the ET.gov site/process to identify the proposed standard. See http://et.gov/component_info.aspx & http://et.gov/pagehelp.aspx#technicalstandard & http://et.gov/stage2.htm. Depending upon how well the ET.gov process matures and is supported, formation of PMO could occur in Stage 3: http://et.gov/stage3.htm Besides the ET.gov site itself, see references to the process on pages 12 - 14 (PDF 14 - 16) of the CIOC's recently issued strategic plan:
http://xml.gov/documents/completed/cioc/StratPlan2007-2009.pdf

Owen Ambur
Co-Chair Emeritus, xmlCoP http://xml.gov/
Project Manager, ET.gov http://et.gov/
FIRM FOB http://firmcouncil.powweb.com/id5.html