How i must design my grails application? My business rules must be implemented only within services (with anemic domain classes, only with getters and setters) or must exist a consensus, putting domain business rules in domain classes and services?
How i must design my grails application? My business rules must be implemented only
Share
Having anemic domain classes is definitely not required, nor is putting all business logic into services.
However, services provide “free” declarative transactions. So if your business logic needs transactional semantics, a service is the right place for it. Other aspects of business logic may be better suited to be part of the domain classes themselves.