Sunday, March 11, 2007

.NET Framework 3.0 (Part 2 - WCF)

note: * indicates "important info"

*
What is Windows Communication Foundation (WCF) ?

Windows Communication Foundation is Microsoft's unified programming model for building service-oriented applications with managed code. It extends the .NET Framework to enable developers to build secure and reliable transacted Web services that integrate across platforms and interoperate with existing investments. Windows Communication Foundation combines and extends the capabilities of existing Microsoft distributed systems technologies, including Enterprise Services, System.Messaging, Microsoft .NET Remoting, ASMX, and WSE to deliver a unified development experience across multiple axes, including distance (cross-process, cross-machine, croPublishss-subnet, cross-intranet, cross-Internet), topologies (farms, fire-walled, content-routed, dynamic), hosts (ASP.NET, EXE, Windows Presentation Foundation, Windows Forms, NT Service, COM+), protocols (TCP, HTTP, cross-process, custom), and security models (SAML, Kerberos, X509, username/password, custom).

How will Windows Communication Foundation change the way developers build applications?

WCF radically simplifies development of distributed applications in several ways.

  1. WCF reduces complexity by unifying the silos that exist with today's distributed technology stacks (Enterprise Services, System.Messaging, .NET Remoting, ASMX, and WSE). This enables developers to compose distributed applications using the best features of each of today's stacks.
  2. Windows Communication Foundation maximizes developer productivity through an attribute-based programming model.
  3. WCF is the first development framework built from the ground up on the principle of service-orientation —enabling developers to build loosely coupled applications that interoperate securely and reliably across platforms.
*How does Windows Communication Foundation address Service Oriented Architecture (SOA)?

WCF is the first programming model built from the ground up to provide implicit service-oriented application development, enabling developers to work autonomously and build applications that are more version independent, thereby increasing application resilience to change.

*Will Windows Communication Foundation be backwards compatible with existing distributed systems technologies?

WCF represents the next logical version for each of today's distributed systems stacks. As such, developers using today's technologies will be able to apply their existing skills to WCF application development. In addition, Windows Communication Foundation will enable side-by-side operation of applications built with existing technologies and Windows Communication Foundation-based applications. Finally, Microsoft will provide guidance for developers upgrading existing code from ASMX, .NET Remoting, .NET Enterprise services, WSE, System.Messaging to Windows Communication Foundation.

*What are the core components of an Windows Communication Foundation service?
  1. A service class, implemented in C# or VB.NET or another CLR-based language that implements one or more methods
  2. A host environment, —an application domain and process—ing which the service runs
  3. One or more endpoints that allow clients to access the service.
How are Windows Communication Foundation services hosted?

A class implementing a WCF service is typically compiled into a library. By definition, all libraries need a host application domain and Windows process to run in. Windows Communication Foundation provides two options for hosting libraries that implement services.

  1. Windows Activation Service (WAS)
  2. any application domain running in an arbitrary process (such as a Windows Forms application, a console application, an NT Service, etc).
*What is Windows Communication Foundation's default communication encoding on the wire?

By default, Windows Communication Foundation uses SOAP (perhaps with some WS-* extensions), represented on the wire in its usual text-based XML encoding. When two Windows Communication Foundation-based services communicate with each other, however, it makes sense to optimize this communication. All of the same features are provided, including reliable messaging, security, and transactions, but the wire encoding used is an optimized binary version of SOAP. Messages still conform to the data structure of a SOAP message, referred to as its Infoset, but their encoding uses a binary representation of that Infoset rather than the standard angle-brackets-and-text format of XML.

Does Windows Communication Foundation support peer-to-peer interaction?

Yes. Windows Communication Foundation services can be hosted in a variety of application types, including desktop applications (built with Windows Presentation Foundation or Windows Forms), COM+ components, Windows Services, etc. This enables developers to simply build service endpoints and have Windows Communication Foundation handle the communication between them.

Does Windows Communication Foundation support both synchronous and asynchronous messaging?

Yes. Windows Communication Foundation supports multiple message patterns, including one-way, request/response, two-way (duplex), and queued.

Will Windows Communication Foundation support transactions that can be coordinated across different platforms?

Yes. Windows Communication Foundation will plug into the Microsoft Distributed Transaction Coordinator (MSDTC) extensibility model and will support WS-AtomicTransaction as well as WS-Coordination to enable coordinated transactions across platforms.

Web services are moving away from WS-Attachments and DIME. What attachments protocol will be used in Windows Communication Foundation?

SOAP Message Transmission Optimization Mechanism (MTOM) will be the attachment technology supported in Windows Communication Foundation.

*What is Service-Orientation and how is it related to Windows Communication Foundation?

Service Orientation is a specific set of architectural principles for building loosely coupled services that help developers maximize the return on your application investments over time. The services have explicit boundaries, are autonomous, share schema and contracts, and determine compatibility based on policy. Applications based on these principles provide benefits in maintainability, reusability, and manageability of connected systems. Windows Communication Foundation is the first programming model built from the ground up for building service-oriented applications.

Why is service orientation important?

Loosely-coupled applications built on the tenets of service orientation yield benefits in maintainability, reusability, and manageability of connected systems. Service-oriented applications also more closely reflect real-world processes and relationships. Microsoft sees service orientation as a means to an end— that end being a set of connected systems that optimize communications across a business —connecting people, information, and devices.

*Does service-oriented development conflict with object-oriented development?

No. Service-oriented development complements object-oriented (OO) development. Object-oriented development continues to fulfill an important role in the internal design of services. Service-orientation deals with how to interconnect services to build connected systems. To use an architecture analogy, OO development addresses the architecture within a single building (a service), while service-orientation addresses the issues around city planning (a system).

How will Windows Communication Foundation make service-oriented development easier?

Today, it is difficult to build service-oriented applications due to the lack of an intuitive service-oriented programming model. Web services provide a great start, but lack support for more advanced communication, including secure and reliable transacted services. Windows Communication Foundation provides both an intuitive service-oriented programming model and the advanced functionality to create service-oriented applications that interoperate across organizational and platform boundaries.

What specifications will Windows Communication Foundation support?

Windows Communication Foundation will support a broad range of Web services standards, including basic standards (XML, XSD, XPath, SOAP, WSDL) and advanced standards and specifications that comprise the WS-* architecture. These include WS-Addressing, WS-Policy, WS-Security, WS-Trust, WS-SecureConversation, WS-ReliableMessaging, WS-AtomicTransaction, WS-Coordination, WS-Policy, and MTOM.

Notes taken from :
Windows Communication Foundation (Indigo) FAQ
Do read David Chappell's Introducing Indigo white paper if you wish to know more.

No comments: