Abstract
The previous chapter talked about Context and Dependency Injection which has become a central and common specification across Java EE. It solves recurrent problems (injection, alternatives, stereotypes, producers . . .) that developers have in their day-to-day job. Validating data is also a common task that is spread across several, if not all, layers of today's applications (from presentation to database). Because processing, storing, and retrieving valid data are crucial for an application, each layer defines validation rules its own way. Often the same validation logic is implemented in each layer, proving to be time-consuming, harder to maintain, and error prone. To avoid duplication of these validations in each layer, developers often bundle validation logic directly into the domain model, cluttering domain classes with validation code that is, in fact, metadata about the class itself.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2013 Antonio Goncalves
About this chapter
Cite this chapter
Goncalves, A. (2013). Bean Validation. In: Beginning Java EE 7. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4627-5_3
Download citation
DOI: https://doi.org/10.1007/978-1-4302-4627-5_3
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-4626-8
Online ISBN: 978-1-4302-4627-5
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)