SOA Patterns > Service Implementation Patterns > Partial Validation
Partial Validation (Orchard, Riley)
How can unnecessary data validation be avoided?
The generic capabilities provided by agnostic services sometimes result in service contracts that impose unnecessary data and validation upon consumer programs.
A consumer program can be designed to only validate the relevant subset of the data and ignore the remainder.
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.
Extra design-time effort is required and the additional runtime data filtering-related logic can reduce the processing gains of avoiding unnecessary validation.
Because the irrelevant data is ignored prior to validation, it is discarded earlier and avoids imposing unnecessary validation-related processing upon the consumer.