st-tu-dresden / videoshop

SalesPoint sample application
Apache License 2.0
87 stars 246 forks source link

Refactor to package structure to better map bounded contexts #67

Closed odrotbohm closed 7 years ago

odrotbohm commented 7 years ago

As the video shop is tightly aligned with Salespoint it makes sense to arrange its implementation with the bounded contexts that Salespoint is structured into.

The current arrangement is a mixture of structuring by different aspects (business domains, but also permissions) that leads to components with a wide variety of dependencies (the BossController has dependencies on orders, the inventory and the customer management). This leads to types needing to be public where – in a better arrangement – they don't necessarily have to be.

Furthermore, we should try to reduce the amount of business logic in controllers. A good example here is the registration of a customer that's using both the UserAccountManager and the CustomerRepository, in this case even in a non transactional way (which is a bug anyway). We should extract a CustomerManagement component that will wrap that creation.