Jesus Rodriguez
Pablo Cibraro
Tellago, Inc
Published: October 2009
Articles in this
series
Introduction
Extensibility is an
essential element of any programming technology or framework. By leveraging
extensibility mechanisms, developers can enhance the basic set of capabilities
provided by a technology and adapt it to specific scenarios. Rich extensibility
models are particularly relevant in distributed systems such as service
oriented solutions given the heterogeneity and complexity of the scenarios
addressed by these types of technologies. The lack of extensibility has
traditionally been a challenge for most Web Services technologies in the
market. To give an example without getting into a market analysis, most of the
J2EE Web Services technologies faced tremendous difficulties adopting the
Representational State Transfer (REST) model given that their messaging engine
was completely based on the SOAP messaging model.
Windows Communication
Foundation (WCF) provides a versatile extensibility model that allows developers
to customize a large variety of the WCF client and service runtime
capabilities. The flexibility of incorporating extensions in different subsystems has made it possible for
WCF to adopt emerging architecture styles such as REST or syndication formats
without requiring major redesigns in its core infrastructure. Similarly, other Microsoft technologies such
as BizTalk Server or ADO.NET Data Services have been able to seamessly
incoporate WCF into their infrastructure by leveraging various WCF extensibility
points. In its current version, WCF includes several dozen extensibility points
that encompass diverse functional areas such as security, message processing,
hosting, instancing or metadata.
The richness of WCF’s
extensibility model enables developers to adopt WCF in diverse service-oriented
scenarios while maintaining a seamless developer experience. However, learning
how and when to use different WCF extensions can be a difficult and often
challenging endeavor.
This paper provides a
pragmatic view of the fundamental components of the WCF programming model. The
paper intends to provide developers with the guidance they need to quickly and
effectively apply the different extensions available in WCF. We have structured
this paper into a series of chapters that cover the different extensibility
points available in the different WCF’s subsystems:
- Extending the WCF
Channel Model
This chapter illustrates the fundamentals of the WCF channel programming model
emphasizing the development techniques that developers can use to build custom
WCF channels. In that sense, this chapter showcases the implementation of
custom elements of the WCF channel model such as factories, listeners and , of
course, custom channels.
- Extending the WCF Client-Dispatcher Runtimes:
This chapter illustrates the extensibility points of WCF’s client and
dispatcher runtimes. The chapter covers the patterns and techniques that can
help developers to customize different capabilities of WCF such as message
interception, message filtering, operation selection, error handling among many
others.
- Extending the WCF Security Model: This chapter
covers the fundamental extensibility points of WCF’s security runtime. The
chapter provides a series of practical recipes that developers can use to
customize the different elements of the WCF security model such as credentials,
tokens, authentication, authorization, or identity representation.
- Extending the WCF Hosting Model: This chapter
explores the different extensions that developers can use to customize WCF’s
hosting model. The chapter emphasizes the techniques used to create custom
service hosts and host factories in order to extend the hosting capabilities of
the WCF runtime.
- Extending the WCF Metadata Model: This chapter
illustrates the extensions available in the WCF metadata model. The chapter
covers the fundamental techniques that allow developers to customize the WSDLs
and policies associated with WCF services.
- Extending the WCF Web Programming Model: This
chapter explores the fundamental extensibility points that developers can
leverage in their REST-based solutions. The chapter illustrates the different
extensions that can be used to customize capabilities such as content type
processing or syndication extensions.
- Extending Dublin Application Server: This
chapter provides an overview of how the WCF’s extensibility model enables some
of the capabilities of the upcoming Windows Application Server. The chapter
illustrates the extensions available to customize Dublin’s forwarding and
tracking runtime services.
- Building Custom Binding Elements and Behaviors:
This section illustrates the use of binding elements and behaviors as the
fundamental mechanisms for initializing the different extensions of the WCF
programming model .
As explained previously, one of the objectives of this paper
is to provide a real world and pragmatic view of the WCF extensibility model.
In that spirit, the paper explores each WCF extensibility point within the
context of real world scenarios. Additionally, we provide practical code
examples that demonstrate the techniques developers should use in order to
effectively implement WCF’s different extensions. In order to keep things
practical, we have provided a set of code samples that provide complete
implementation of the extensibility points illustrated in this paper.
About the Authors
Jesus Rodriguez:
Jesus Rodriguez is the Chief Architect of Tellago, Inc. He is also a Microsoft
BizTalk Server MVP, an Oracle ACE and one of a few Architects worldwide to be a
member of the Microsoft Connected Systems Advisor team. As a member, Jesus has
been selected to participate in a variety of Software Design Reviews with
Microsoft's Product Teams including Windows Communication Foundation, Windows
Workflow Foundation and BizTalk Server.
Jesus derived his extensive experience with business process
integration and messaging through numerous implementations of disparate systems
founded on the principles of SOA and BPM. Jesus is an active contributor to the
.NET and J2EE communities and an internationally recognized speaker and author
with contributions that include several articles for various publications
including MSDN Magazine, Microsoft Architecture Journal, SOAWorld and Web
Services Journal as well as speaking engagements at top industry conferences
such as Microsoft TechEd, SOAWorld, Microsoft SOA and BPM Conference, Oracle
Open World, software Architect Conference, Web Services Security Conference and
the Microsoft MVP Summit. Additionally, Jesus has conducted a number of Web
Casts on varying SOA technologies.
Jesus is a prolific blogger on all subjects related to
integration and has a true passion for technology. You can gain valuable
insight on leading edge technologies through his blog at http://weblogs.asp.net/gsusx.
Pablo Cibraro:
Pablo is a senior architect in Tellago Inc, and an internationally reconigzed
expert with over 10 years of experience in architecting and implementing large
distributed systems with Microsoft Technnologies.
He has spent the past few years working directly with the
Microsoft Patterns & Practices team on sample applications, patterns and
guidance for building service-oriented applications with Web Services, Web
Services Enhacements (WSE) and Windows Communication Foundation (WCF). The
biggest contributions with this team were the Web Services Security patterns,
and the implementation of a Secure Token Service quickstart for WSE 3.0 and
WCF.
He now focuses on technologies that enable developers to
build large scale systems such as WCF, WF, Dublin, OSLO and Windows Azure.
The community knows Pablo mainly for his weblog and active
participation in conferences and forums.