Typical layered architecture - project structure

303 views Asked by At

What is the most popular project structure in n-layered applications (not DDD or onion architecture)?

1.

UI project has reference to BLL and DTO project

BLL project has reference to DAL, Entities and DTO project

DAL project has reference to Entities project enter image description here

2.

UI project has reference to BLL project

BLL project (which contains Data Transfer Objects) has reference to DAL project

DAL project (which contains Entities) has no references enter image description here

3.

Something else?

1

There are 1 answers

0
Matt Timmermans On

Your diagrams show pretty much the same architecture.

The only difference is that in the first one you've broken entities and DTOs out into separate projects. That would be very strange, and I can't think of a situation in which this would be a good idea. It's different from breaking the interface and implementation out into separate projects, which might occasionally be useful.

The word "layered" implies a linear dependency structure like your 2nd diagram.