I have some doubts about organizing code. I see two ways of organizing code: package by layer
and package by component
.
http://www.codingthearchitecture.com/2015/03/08/package_by_component_and_architecturally_aligned_testing.html
The ABP framework itself does not require a specific form to be adopted, and both forms appear to be supported.
Only package by layer
can be seen in the sample given by ABP framework. It is not clear whether package by component
can be used.
For example, there are three boundary contexts: order, product and customer.
If package by layer
is used, it will be as shown in the figure below.
Project.sln
Project.Application
OrderContext
ProductContext
CustomerContext
Project.Core
OrderContext
ProductContext
CustomerContext
Project.EntityFrameworkCore
...
If package by component
is used, it will be as shown in the figure below.
Project.sln
hosts
Project.Host
modules
orders
Order.Application
Order.Core
Order.EntityFrameworkCore
products
Product.Application
Product.Core
Product.EntityFrameworkCore
customers
Customer.Application
Customer.Core
Customer.EntityFrameworkCore
Which method is more widely used in the ABP framework?