I've been studying the Onion Architecture for a couple of weeks now and I've stumbled across a technical dealema.
When I say "module" notice that I'm referring to a notion of project. To be more clear it's compatible to: module = .NET Assembly/Java gradle module
There are 2 module patterns that I have seen so far in most Onion Architecture projects which are:
1 - Each layer possesses its own module so it would have:
- domain-entities
- domain-interfaces
- services-interfaces
- services
- infrastructure-data
- infrastructure-logging
- ui
2 - All related modules are encapsulated into a single module:
- core (domain-entities, domain-interfaces, services-interfaces, services)
- infrastructure (infrastructure-data, infrastructure-logging)
- ui
The second approach seams pretty much more straightforward to me but I'm not so sure if it will lead to dependency problems in the future. Any advice?
Aucun commentaire:
Enregistrer un commentaire