What's new

Bean validation inside the domain abstraction


Active member
Staff member
I have been reading Clean Architecture by R. C. Martin.

I'm trying to make sense of it, by developing a small project where I'm trying to apply its concepts. One core concept in the domain layer is to not use frameworks, 3rd party lib, and avoid @Annotations, simply make the classes in the domain pure POJOs.

I would like to know 2 things. Is it conceptually right to do my "entities" validations inside the domain layer and if so, using Bean Validation would be a reasonable option since it is a specification by java itself?

Continue reading...