0

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?

user2017341
  • 145
  • 1
  • 8
  • 1
    This is not on topic here, and besides, your referece lines need a direction. – H H May 12 '19 at 15:31
  • If not here then where? :( – user2017341 May 12 '19 at 15:39
  • Layered style implies dependencies between modules which are typically depicted with direction specification in order to understand what depends on what. Apart from that, the term "most popular" is too vague as there is no statistics of historical data out there which would reflect popularity of very specific layered models. – Dmytro Mukalov May 12 '19 at 16:22

1 Answers1

1

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.

Matt Timmermans
  • 53,709
  • 3
  • 46
  • 87