A technique using AspectJ and custom Java annotations to mark framework-required artifacts (like no-arg constructors and setters needed by Hibernate or BlazeDS) in domain model classes. By annotating these methods with @FrameworkArtifact, developers can document why otherwise-unwanted methods exist and use AspectJ aspects to enforce that application code never calls them directly, preserving domain model integrity and immutability principles from Domain-Driven Design.

1m read timeFrom wimdeblauwe.com
Post cover image

Sort: