Layers as Separate Assemblies, Circular Dependency, Architecture Question

C

cmo63126

I'm currently refactoring a small to mid-size web application. One of
my goals is to keep my layers as loosely coupled as possible. I've
created 3 separate assemblies (Web GUI, Business Logic, Data Access).
The problem I am initially encountering with my redesign is in passing
objects to and from the Business Layer and Data Access Layer. If the
layers reside in the same assembly I wouldn't have a problem. However,
since both layers have to reference each other, I am unable to build
due to circular dependency.

Is it a good idea to create another assembly containing interfaces both
the Business Layer and Data Access Layer can communicate with (e.g.
PetShop 3.0) or is there a more efficient way?

Is it a good idea to strictly separate my layers into individual
assemblies?

Thanks in advance.
 
L

LOZANO-MORÁN, Gabriel

What I often do is create a common layer where I put things like typed
datasets or business entities. This assembly can be referenced in all the
other layers.

Gabriel Lozano-Morán
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top