CSC/ECE 517 Spring 2023 - E2312 + E2313. Reimplement response.rb and responses controller.rb
In order to accommodate issues with another team, our team picked up another member and did both projects. The summaries of the projects are combined here to reflect that.
E2312 Reimplement Response
Summary of Changes
The previous version of response.rb was described as "a mess." The goal of E2312 was to reimplement it to follow better coding standards.
- Made method names clearer, most method names were opaque
- Moved many functionalities to mixins or helper classes to not violate Single-Responsibility
- Reduced usage of class methods
Functionality Moved
This section covers the functionality that was moved out of the response model.
Score Calculation
Score calculation is not inherently tied to the idea of a response. Any object with multiple scores could take advantage of a mixin that provided methods to do calculations on those scores. Functionality for calculating total, average, and maximum scores were all moved to a new Scorable mixin which can be leveraged by other models moving forward.
Emails
The response model provided methods for creating emails. This was moved to a new mixin which can be expanded on to provide email functionality to more models in the future.
Metrics
TODO
Improved Naming
TODO
Testing
TODO