Business domain: e-commerce
We will keep working on our e-commerce example in this chapter. This time, the focus is on the API. The API lets you read and write data that’s important in the e-commerce domain. What’s important to keep in mind as you develop this API is that there are a couple of important aspects to it:
- Logical domains: It’s beneficial to divide up your app into different logical domains. Within the context of e-commerce, that usually translates to products, orders, invoices, and so on.
- What part of the business should handle each logical domain?
- Products: Maybe there’s a dedicated team. It’s common for the same team to also manage all types of discounts and campaigns that might occur.
- Invoices and payment: There’s usually a dedicated team that takes care of how the user can pay for things, for example, via credit cards, invoices, and other methods.
- Inventory: You need to have...