The B2B-Suite is a collection of loosely coupled mostly uniform components packaged with a small example plugin and a common library.
A single component with all layers and the maximum of allowed dependencies looks like this:
The responsibilities from bottom to top:
Layer | Description |
---|---|
Shop-Bridge | Bridges the broad Shopware interfaces to the specific framework requirements |
<
ul>
<
ul> Framework | Contains the B2B specific Domain Requirements
REST-API | REST access to the services Frontend | Controller as a service for frontend access B2B-Plugin | Store front access to the services
Please notice: Apart from framework all other layers and dependencies are optional.
At the time of this writing there are 18 different components, all build with the same structure. We sorted these components into four different complexes:
There is a small library of shared functionality. It contains a few commonly used technical implementations that are shared between most components like exception classes, repository helpers, a dependency manager, or a REST-API router.
The user management is based on the StoreFrontAuthentication
component and then provides Contact
and Debtor
entities which have Address
es and Role
s. These entities are mostly informational and CRUD based. Other parts of the system only depend on the StoreFrontAuthentication
component but not the specific implementations as debtor or contact.
The Acl
implementation is connected to most other entities provided by the B2B-Suite.
ContingentGroups
s are connected to Debtor
s and can have Acl
settings based on Role
s or Contact
s. Order
s are personalized through the StoreFrontAuthentication
.
Most dependencies are directly derived from requirements. So, the dependency flow of the components should follow the basic business needs. There are a few exception, mainly the M:N assignment components each representing a reset in complexity where a complex feature just resolves itself into a context object for another use case. You can think of it like that.
So - for the sake of completeness - this is the whole picture:
Everything you should get from that is, that there is a left to right propagation of dependencies. The components on the left side can be used and even useful entirely without the components on the right side.