
A Better (Beyond CRUD) Architecture
I see this as a good beginning style for any project. Unless it’s a trivial brochure website, your software will likely get bigger but not remain simple at the same time.
I present this, not as anything radically new, but as a foundation so that software folk no longer think too much in terms of CRUD.
In particular, I would like to point out the Infrastructure layer that I think should always be wrapped. It’s the most troublesome layer to deal with when things change. By using interfaces that are specific to your particular business needs you hide away the infrastructure (or included packages).
I should stress that the Domain layer should also only express business needs. In short “if it’s not talking about a specific business need that you’re referencing somewhere, drop it”. Getters and setters are a prime violation of this.
By designing your software in terms of Domain or Infrastructure you’ll have an easier time. Then coordinate it with the Application layer.