Databases Reference
In-Depth Information
Building Validation into
Services
Once we have divided our solution into a number of composite components, one of
the next questions we are typically faced with is:
"Where should I put my validation and how should I implement it?"
At first glance, this may seem like an obvious question, but once you consider
that a composite may be made up of other services, which in turn could be made
up of other services and so on; it becomes clear that you could potentially end up
implementing the same validation in every level.
Apart from the obvious performance implications, you also have the issue of
having to implement and maintain the same validation at multiple points
within the solution.
When you get down to an individual composite, you still have to consider, where
in the service to place the validation and how best to implement it. Particularly, if
you want the flexibility to be able to change the validation within a service without
having to re-deploy it.
This chapter guides us on how best to address this question. It examines how we
can implement validation within a service using XSD validation, Schematron,
and Business Rules as well as within the service itself. With each of these options,
it looks at the pros and cons and how they can be combined to provide a flexible
validation strategy.
Finally, we look at validation within the context of the overall solution and provide
guidelines for deciding which layer within the architecture to place our validation.
Search WWH ::




Custom Search