I have the following Onion Architecture
framework.
Domain
Entities
- For my domain entitiesInterfaces
- For my domain interfacesServices
- For my domain services
Infrastructure
Data
- ForFluent NHibernate
persistenceInterfaces
- For infrastructure interfacesLogging
- Just an interface for logging in case I want to switch out my logging library to something else.Dependency Resolution
- Most of myIoC
registrations goes in here.
Services
Interfaces
- Application service interfaces goes in here, they will get implemented in theUI
project.
Tests
Infrastructure Tests
- For testing infrastructure services etc.Domain Tests
- For testing domain models and services
Web
UI
- User interface project where I implement application services, user interface, etc ...
With Domain Driven Development
one would identify the Bounded Contexts
. Most of the literature on the internet states that each Bounded Context
needs to be abstracted into their own project or namespace.
- Is my approach then incorrect for having all my
Domain Models
in one project and all myDomain Services
in another project? Does it really matter not having different bounded context's in different namespaces or projects? - If you have a
Model A
which is used myBounded Context A
, butBounded Context B
,Bounded Context C
, etc also needs to use the exact sameModel A
, Do you allow them to use that exact same model, or do you create a new model for eachBounded Context
?
I am new to DDD so sorry if this question is a dumb question. I find myself understanding something better if I ask a question and get a good explanation as an answer.
Any Help will be much appreciated.
Aucun commentaire:
Enregistrer un commentaire