Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The crewmember goes to the rewatch race page race page where the front-end does a call to the back-end. This activates the getAllRaces method in the RaceResource. The resource is only responsible for returning the response so it gets delegated to the RaceControllerRaceService. The RaceController RaceService delegates this to the raceDAO because getting the data from the database is not the responsibility of the controllerservice. 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. This structure is based of the the layer pattern.

...

When a crewmember opens the a tab, the front-end does a call to the back-end. It calls a method to SensorWithGraphResource. This is the controller service of the SensorWithGraphDAO that gets the data which is needed for displaying graphs on the front-end. The SensorWithGraphDAO creates two DTO's. This is because the DAO uses them to send the data from the database to the resource. 

...