Interaction within Business Logic Layer in 3-layered Architecture?

198 views Asked by At

We follow 3-tier architecture, where we have presentation layer, business logic layer (Managers) and Data Access Layer. There are few processes that involves multiple entities which are controlled by different BLL classes (we refer to BLL classes as managers). Can we have one Manager class interacting horizontally with another Manager class. Wanted to know the opinion of the community, as just relying on Manager-DAL flow is creating a lot of code duplication.

1

There are 1 answers

4
Martin Nowosad On

I don't see anything particularly wrong with that also this happens more often than you might expect. In a layered client application for example, within the data layer you'll usually find a class that speaks to a framework / platform specific cache (usually it writes to the HD). Since the framework and data layers are on the same low abstraction level, it is fine for them communicate without having an architectural break.

The main thing that should be avoided is a dependency direction from the more abstract layers (entity / domain / business layer) to the less abstract layers (data or presentation layers).