1104-Middleware-restructure/cleanup #1130

Merged
a22erigr merged 5 commits from 1104-Middleware-restructure/cleanup into team_2_week_7 2026-05-26 06:49:49 +00:00
Collaborator

What has been done

Some general clean up and small restructuring in:

  • middleware/middleware/Program.cs
    • Removed unnecessary imports
    • Changed how we split topic, I think this is easier to understand, but feel free to disagree!
    • Changed some comments to be more explicit
    • Fixed camelCase on some variables
    • Switched places of InsertMessage and Sanitize methods
    • Removed switch case with only one case

I had conversation about the CreateTable methods and the necessity of it, where it was decided that we probably will move creation of table to init sql-files, instead of going through the method each time we want to insert a value, which is quite ineffective. I have therefore not made any meaningful changes to that method

## What has been done Some general clean up and small restructuring in: + middleware/middleware/Program.cs + Removed unnecessary imports + Changed how we split topic, I think this is easier to understand, but feel free to disagree! + Changed some comments to be more explicit + Fixed camelCase on some variables + Switched places of InsertMessage and Sanitize methods + Removed switch case with only one case I had conversation about the CreateTable methods and the necessity of it, where it was decided that we probably will move creation of table to init sql-files, instead of going through the method each time we want to insert a value, which is quite ineffective. I have therefore not made any meaningful changes to that method
Collaborator

Review on Pr #1130, Issue #1104

Reviewed the code and the logs from running it in a Docker container.

Tested on Arch Linux using Librewolf (a Firefox browser)

  • The app starts.

Inspected the following file

  • middleware/middleware/Program.cs
    • Indentation/code styling
      • It's okay 👍
    • Naming convention
      • I also took the liberty of renaming dbPassword and dbUser to DbUser and DbPassword, since we count readonly as constant values.
    • Comments
      * Are mostly good, except that the line "; // <-- topic # is a wildcard for all topics" should instead be placed on its own line. And each comment needs to start with a capital letter.
    • General code quality
      • Several non-critical issues were found, like the missing namespace in the file. I took the liberty of fixing them since it was 1 key press, and it is still the same code, more or less at the end.

What needs to be done

Fix the comment, and make sure that each two or more line comment uses /* */ style comments instead of //.

Conclusion

The small fixes should be looked over, and the comments should be fixed.

# Review on Pr #1130, Issue #1104 Reviewed the code and the logs from running it in a Docker container. ## Tested on **Arch** Linux using **Librewolf** (a Firefox browser) * The app starts. ## Inspected the following file * **middleware/middleware/Program.cs** * **Indentation/code styling** * It's okay 👍 * **Naming convention** * I also took the liberty of renaming dbPassword and dbUser to DbUser and DbPassword, since we count readonly as constant values. * **Comments** * Are mostly good, except that the line "; // <-- topic # is a wildcard for all topics" should instead be placed on its own line. And each comment needs to start with a capital letter. * **General code quality** * Several non-critical issues were found, like the missing namespace in the file. I took the liberty of fixing them since it was 1 key press, and it is still the same code, more or less at the end. ## What needs to be done Fix the comment, and make sure that each two or more line comment uses ``/* */`` style comments instead of ``//``. ## Conclusion The small fixes should be looked over, and the comments should be fixed.
c24elipe left a comment
Collaborator

See review for comment

See review for comment
a22erigr approved these changes 2026-05-26 06:49:41 +00:00
a22erigr left a comment
Collaborator

Review

Inspected all of the changed files. I focused on the comments because the rest has been approved. The comments look good

## Review Inspected all of the changed files. I focused on the comments because the rest has been approved. The comments look good
a22erigr merged commit 78f149e4d1 into team_2_week_7 2026-05-26 06:49:49 +00:00
a22erigr deleted branch 1104-Middleware-restructure/cleanup 2026-05-26 06:49:50 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!1130
No description provided.