so this big project I have, I'm not able to really make it cleaner. Its VERY tightly coupled together.
There is a "coreframework" project which contains heavily type of subclasses and inhertiences.
in this project, it also uses the DAL. I'm trying to seperate this out and have this done.
In this project also, there is some business logic. I'm moving this into a seperate layer altogether, which then communicates with the DAL.
the main UI sometimes calls the DAL directly. so im almost finished seperating it out but with one big problem:
there is another project called DBTypes. This has heavily decorated XML attributes for serializing/deserializing to an external webservice. In addition, a whole bunch of methods and properties that do some funky get/sets and raising events like OnPropertyChange, which is within a base class in the CoreFramework which then does some internal look ups and doing some other inhertiance type look ups and executions.
I have a "Contracts" project which does NOT reference the coreframework. I dont want it to. The project contains pretty much like DTO type objects, just simple get sets.
This is what I want to pass into the service layer (middle tier) so it can then serialize and call the external webservice. That's cool.
The problem then is returning data back. It needs to be of the same type as the DBTypes project as when its setting things, it does the "funky" stuff to set the object correctly. The DTO returning back is not good enough at all and makes the crux of the application basically stop working.
I cannot add a reference from "Contracts" TO DBTypes because of circular reference (indirectly). The circular reference comes from the CoreFramework referencing Contracts, the DBTypes referencing CoreFramework.
what can I do? This is seriously giving me a headache. when you are almost "there", then another whole issue begins.
There is a "coreframework" project which contains heavily type of subclasses and inhertiences.
in this project, it also uses the DAL. I'm trying to seperate this out and have this done.
In this project also, there is some business logic. I'm moving this into a seperate layer altogether, which then communicates with the DAL.
the main UI sometimes calls the DAL directly. so im almost finished seperating it out but with one big problem:
there is another project called DBTypes. This has heavily decorated XML attributes for serializing/deserializing to an external webservice. In addition, a whole bunch of methods and properties that do some funky get/sets and raising events like OnPropertyChange, which is within a base class in the CoreFramework which then does some internal look ups and doing some other inhertiance type look ups and executions.
I have a "Contracts" project which does NOT reference the coreframework. I dont want it to. The project contains pretty much like DTO type objects, just simple get sets.
This is what I want to pass into the service layer (middle tier) so it can then serialize and call the external webservice. That's cool.
The problem then is returning data back. It needs to be of the same type as the DBTypes project as when its setting things, it does the "funky" stuff to set the object correctly. The DTO returning back is not good enough at all and makes the crux of the application basically stop working.
I cannot add a reference from "Contracts" TO DBTypes because of circular reference (indirectly). The circular reference comes from the CoreFramework referencing Contracts, the DBTypes referencing CoreFramework.
what can I do? This is seriously giving me a headache. when you are almost "there", then another whole issue begins.