-
Notifications
You must be signed in to change notification settings - Fork 0
4.1. Problem domain PD1
./problem-domain-pd1/
CRUD problem domain
This problem domain is going to be about a common set of API's that solve a typical set of CRUD operations over some sample topic like ecommerce, school organization or any other. It also has a DB solution which will be common to all backends.
CRUD, Sakila, MySQL, OpenAPI / Swagger
The DB should be a standalone solution not tied to any backend, also a lightweight one to enable rapid testing / prototyping.
- MySQL running in docker
Location of sakila db:
./problem-domain-1/db/
We can start choosing the topic from a sample db in order to accelerate the process.
- We could use a well-known one for testing like sakila
Here we can find some details about the sakila db schema and the entity diagram, the ER-diagram looks like the following.
As we can see we have some clusters of common themes, we can choose one for our implementation.
- For example, the 'Inventory' cluster
We can use the OpenAPI specification (yaml file) in order to define the required APIs that the backend solutios would implement. In this case, we are defining a set of endpoints for 'films' in sakila db (film table description).
Location in code:
./problem-domain-1/api/
Additionally, we could use the openAPI generator to generate server stubs as described here, for a Spring based Java app in this case.
