Home > Design Patterns > Partial Validation
Partial Validation

Partial Validation (Orchard, Riley)

How can unnecessary data validation be avoided?

Problem

The generic capabilities provided by agnostic services sometimes result in service contracts that impose unnecessary data and validation upon consumer programs.

Solution

A consumer program can be designed to only validate the relevant subset of the data and ignore the remainder.

Application

The application of this pattern is specific to the technology used for the consumer implementation. For example, with Web services, XPath can be used to filter out unnecessary data prior to validation.

Impacts

Extra design-time effort is required and the additional runtime data filtering-related logic can reduce the processing gains of avoiding unnecessary validation.

Architecture

Composition

Listen to the podcasts that accompany this site

Partial Validation: Because the irrelevant data is ignored prior to validation, it is discarded earlier and avoids imposing unnecessary validation-related processing upon the consumer.

Because the irrelevant data is ignored prior to validation, it is discarded earlier and avoids imposing unnecessary validation-related processing upon the consumer.

Related Patterns in This Catalog

Service Agent, Service Façade, Validation Abstraction

Related Service-Oriented Computing Goals

Increased Intrinsic Interoperability, Reduced IT Burden