Hello guys,
I'm working on a project that we are making a big redesign of its architecture.
In the past, all the systems here were sold in one big package. Even if the client didn't need the system "B", he would have it installed but blocked using a flag in a database table.
They were doing so, because they didn't have time/people to design a less coupled architecture.
Our current design is a basic three layered architecture:
- DTO - POCO classes.
- DAL - nHibernate & fluent mapping.
- BLL - Business layer.
We tried to decouple the big system into small systems following the same architecture.
System A:
System B:
But we run into some cyclic references, since some classes of A.DTO uses classes of B.DTO, vice versa.
Our first shoot was to reduce the coupling through Dependency Injection at the DTO and BLL layers.
Now we are struggling to map our DTO classes with fluent since we need to deal with multiple inheritance.
After some "googling", we found many comments and discussions that there is no reason to use DI in the DTO and it should be avoid, which makes me think that we were going into the wrong way.
In my case, what could be done to decouple my system into small systems, is there a better common architecture for it?
Should I separate my DTO classes into small projects or keep them in one big DTO?
Thanks