Versions Compared

Key

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

Sequence Diagramss

Login

Sequence diagram login

...

The loginResource should only return the response, since it's a resource and should apply the Single Responsibility rule. The loginService is an information expert, since it knows and keeps all the information from the classes. The userDAO sends a call to the database, which happens in the selectQuery method. 

Design decisions

Decision

Description

Problem/Issue

The passwords can be seen by anyone who has access to the database. This is a huge security risk.
DecisionUsing Argon2, we can hash the passwords of users, so that a hashed password is stored in the database. This prevents hackers from seeing someone elses password.
AlternativesSHA-512, MD5, PBKDF2, BCrypt, and SCrypt (Millington, 2022)
ArgumentsFrom a comment in Baeldung (Millington, 2022), I saw Argon2 being suggested. Going to the Supertokens website (Supertokens Team, 2022), I found a tool that detects how safely a password is. With that Supertokens also recommended to use this hashing tool this march, which is quite recent. It uses more resources from your computer, but it makes a stronger password from it. Regterschot Racing required minimum security, that also includes a hashed password.

Decision

Description

Problem/Issue

LoginService contains both the logic and sends the response
DecisionMake a new class loginResource which is responsible for only sending the response
AlternativesMake a god class
ArgumentsIf one class has to many responsibilities it doesn't obey the SOLID principle (BMC, 2022)


View data per round

Sequence diagram view data per round

...

The crewmember goes to the rewatch 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 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. This structure is based of the the layer pattern.

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
DecisionIn the constructor of RaceDTO the car get's the value "BMW 320 4fl E46" assigned
AlternativesStore 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. 


Place Graph

Sequence diagram show sensor

...

The crewmember interacts with the front-end by clicking on the desired graph type. This will call a method to create the graph on the sidebar component. This is because the sidebar component is the controller. The SidebarComponent will interact with GlobalComponent because the SidebarComponent knows everything about GlobalComponent. GlobalComponent knows what is in the user's tabArray, which is why the push method on that array is called.


Design decision

Decision

Description

Problem/Issue

There is no graph linked to a sensor.
DecisionThere won't be an available graphs to add to a tab.
AlternativesGive every sensor a normal table (for example), so there is always a graph available.
Arguments

Not every sensor has data that fits in a normal table.


Graph CRD

sequence diagram deletegraph

...