Return to Home Page
Overview
    History
    Acknowledgements
    Podcasts
    Notification Form
    Feedback Form
    Press Release #1
    Press Release #2
    Press Release #3

Master SOA Design
Pattern Catalog
    Master Pattern List (alphabetical)
    Master Pattern List (by category)
    Master Pattern List (Text)
    Pattern Notation
    Pattern Profiles
    Symbol Legend
    Pattern Contribution Form

SOA Candidate Patterns
    SOA Patterns Review Committee
    Candidate Patterns Overview
    Candidate Patterns List
    Candidate Pattern Contribution Form
    Candidate Pattern
Feedback Form
    SOA Pattern Template

Design Pattern Basics
    What's a Design Pattern?
    What's a Design Pattern Language?
    What's a Compound Pattern?

Supplemental
    SOA Patterns and Application Technologies
    SOA Design Patterns Historical Influences
    SOA Design Patterns and Design Principles
    SOA Design Patterns and Design Granularity
    Legal

Resources
    Design Patterns Publications
    Reference Posters
    SOAPrinciples.com
    WhatIsSOA.com
    SOA Visio Stencil

About the Book



SOA Design Patterns
by Thomas Erl

For more information visit: www.soabooks.com/patterns

Related Publications


"Introducing SOA Design Patterns", SOA World Magazine (PDF)



"The Case for Single-Purpose Services: Understanding the Non-Agnostic Context and a Strategy for Implementation", SOA Magazine (HTML)



"REST-Inspired SOA Design Patterns", SOA Magazine (HTML)



"Service-Orientation and Object-Orientation Part I: A Comparison of Goals and Concepts", SOA Magazine (HTML)



"Service-Orientation and Object-Orientation Part II: A Comparison of Design Principles", SOA Magazine (HTML)



"Service Facade", InformIT (HTML)



"Non-Agnostic Context", InformIT (HTML)



"Domain Inventory", InformIT (HTML)



"Service Normalization", InformIT (HTML)



"Service Decomposition", InformIT (HTML)



"Canonical Schema", InformIT (HTML)



"Policy Centralization", InformIT (HTML)





Uniform Contract (candidate)


Home > Candidate Patterns List > Uniform Contract

Uniform Contract is a compound pattern comprised of the combined application of Reusable Contract, Lightweight Endpoint, and Entity Linking.


Figure 1: The Uniform Contract compound pattern.

Uniform Contract is considered a variation of Reusable Contract that is applied to all services within a given boundary (usually a service inventory). This compound pattern further requires that service functions are broken down into individual granular resources, as per Lightweight Endpoint and that links from one resource to another can be followed to allows service consumer to invoke the capabilities of each resource without foreknowledge of the service that exposes them. The link itself provides supplementary business context information that may have been abstracted out of the uniform contract. It both identifies the resource and provides machine-readable context that describes the business concept to which the link is referring. As a result, a uniform contract enables the dynamic recomposition of services and consumers.

Service consumers are able to discover new URLs at runtime and interact with them correctly because the interaction they want to perform is the same, regardless of which resource the interaction is directed at. Consumers are also able to use new resources they discover over the course of these interactions and use them correctly.

Uniform contracts are highly abstract and general. As explained in previous chapters, they are a core part of REST service architecture, relying on generic methods, such as GET and PUT, which are combined with media types in order to maximize the applicability and reuse of the contract. Also included as part of a uniform contract are headers and status codes used as part of the protocol and media types such as those in common use on the Web.



Figure 2: A uniform contract may necessitate that services expose multiple lightweight endpoints in order to provide enough context to ascribe meaning to uniform method invocations. In this case, the service capabilities can be read as "fetch the tax report", "fetch the invoice report", and "fetch the customs report". Each of these capabilities can return information in documents compliant with the same report media type.


Uniform Contract Pattern vs. Uniform Contract Constraint

The Uniform Contract compound pattern provides an alternative means of viewing and breaking down the uniform contract artifact and the Uniform Contract REST constraint that has were introduced in Part I and will continue to be referenced throughout upcoming chapters. To avoid confusion, when discussing an architecture from a patterns or constraints perspective, the capitalized term "Uniform Contract" is further qualified as a design pattern or constraint.
SOA with REST This page contains excerpts from:

SOA with REST: Principles, Patterns & Constraints
by Raj Balasubramanian, Benjamin Carlyle, Thomas Erl, Cesare Pautasso





(ISBN: 0137012510, Hardcover, 400+ pages)

For more information about this book, visit
www.soabooks.com.
The Prentice Hall Service-Oriented Computing Series from Thomas Erl
Home    SOA Books    SOA Magazine    What is SOA?    SOA Principles    SOASchool.com    SOA Glossary Copyright © 2007-2011
SOA Systems Inc.