SOA Patterns > Service Contract Design Patterns > Validation Abstraction
Validation Abstraction (Erl)
How can service contracts be designed to more easily adapt to validation logic changes?
Service contracts that contain detailed validation constraints become more easily invalidated when the rules behind those constraints change.
Granular validation logic and rules can be abstracted away from the service contract, thereby decreasing constraint granularity and increasing the contract’s potential longevity.
Abstracted validation logic and rules need to be moved to the underlying service logic, a different service, a service agent, or elsewhere.
This pattern can somewhat decentralize validation logic and can also complicate schema standardization.
By reducing the overall quantity of constraints and especially filtering out those more prone to change, the longevity of a service contract can be extended.