...
The crewmember goes to the view races page where the front-end does a call to the backend. This activates the getAllRaces method in the Raceresource. The resource is only responsible for returning the response so it gets delegated to the racecontroller. The Racecontroller delegates this to the raceDAO because getting the data from the database is not the responsibility of the controller. In the RaceDAO a database connection is established to get all the data from the database. The benefit of this structure is that you can easily swap the classes which results in low cohesion and high coupling.
Design decision
Decision | Description |
---|---|
Problem/Issue | The name of the racecar is |
not stored in the database because this is not necessary at the moment | |
Decision | In the constructor of RaceDTO the car get's the value "BMW 320 4fl E46" assigned |
Alternatives | Store it in the database, leave it empty |
Arguments | The BMW is the only car they intend to use in the near future so it's not necessary to make a new table for racecar. |
Database Design
This is the database setup we will use for the RegterschotRacing API. A full description of every tables usage and datatypes can be found below.
...