
Defining Service-Oriented Architectures
Service-Oriented Architecture (SOA) is little more than a design methodology for building robust distributed
systems.
• SOA is not limited to a specific programming language (C#, Java, VB6, etc.).
• SOA is not limited to a specific development platform (.NET, JAVA EE, COM, etc.).
• SOA is not limited to a specific operating system (Windows, Mac OS X, etc.).
• In fact, SOA enables all varieties of languages, platforms, and OSs to share information.
Understand that XML web services are simply an implementation of a SOA-based architecture. WCF is
another implementation of a SOA-based architecture.
At its core, SOA encourages building distributed systems using a component-based architecture. A SOA-
based system prefers loosely coupled message data (e.g., XML), a neutral wire format (such as HTTP), well-
defined interfaces (e.g., WSDL), and a way to invoke remote members (SOAP). Under SOA, ‘components’
are often termed services.
The only way callers can communicate with services is through a well-defined set of interfaces. These
interfaces define the incoming parameters, outgoing response, and member names.
Using this design, a service can be constructed in such a way that it is an autonomous entity. The caller and
service make use of loosely coupled messages to communicate. The callers make no assumptions regarding
the services’ internal implementation.
The Four Tenets of SOA
When WCF was designed, it was done by honoring the ‘four tenets’ of SOA. Here is a walkthrough of the
SOA design principles upon which WCF is built.
Tenet 1: Boundaries are explicit.
• A WCF service is expressed using well-defined interfaces (e.g., descriptions of each member, its
parameters, and its return values).
• The only way that an external caller is able to communicate with a WCF service is via the interface,
and the external caller remains blissfully unaware of the underlying implementation details.
Tenet 2: Services are autonomous.
• ’Autonomous’ refers to the fact that a given WCF service is, as much as possible, an island unto
itself.
• An autonomous service should be independent with regard to version issues, deployment issues,
and installation issues.
• Once an interface is in production, it should never be changed because you will risk breaking
existing clients.
• Exceptions that are raised within the service should not affect other callers. In other words, the
service should be fault tolerant.
Tenet 3: Services communicate via contract, not implementation.
• The third tenet is yet another byproduct of interface-based programming in that the
implementation details of a WCF service (which language it was written in, how it gets its work
accomplished, and so on) are of no concern to the external caller.
• WCF clients interact with services solely through their exposed public interfaces.
• If the members of a service interface expose custom complex types, they need to be fully detailed
as a data contract to ensure all callers can map the content into a particular data structure.
• Published interfaces should never change, or at very least remain backwards compatible with
previous versions. This requires discipline on the part of the programmer.
Tenet 4: Service compatibility is based on policy
• It is important to point out that interfaces / WSDL alone is not expressive enough to detail aspects
of what the service is capable of doing.
• Given this, SOA allows developers to define ‘policies’ that further qualify the semantics of the
service (e.g., the expected security requirements used to talk to the service).
• Using these policies, you are able to separate the low-level syntactic description of the service
(i.e., the exposed interfaces) from the semantic details of how they work and how they need to be
invoked.
• For example, policy can define communication protocols, security requirements, reliability
requirements, and so on.
• COM+ and .NET remoting had no way to enforce policy. The WSE toolkit (seen earlier in this
chapter) and WCF do have ways to enforce policy.
To summarize SOA, remember the following:
• SOA is simply a way to design distributed systems where autonomous services can exchange data
using loosely coupled messages via well-defined interfaces.
• XML web services and WCF are two examples of SOA-based systems.
Defining Service-Oriented Architectures
Table of Contents
Copyright (c) 2008. Intertech, Inc. All Rights Reserved. This information is to be used exclusively as an
online learning aid. Any attempts to copy, reproduce, or use for training is strictly prohibited.
Courseware
Training Resources
Tutorials
Services