CSC/ECE 517 Spring 2024 - E2415. Reimplement responses controller.rb (Design Document): Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:


==2.Problem Statement==
==2.Problem Statement==
 
The ResponseController in Expertiza, a legacy system with conventions predating Rails standards, is overly complex, encompassing functionalities beyond basic CRUD operations and needing adherence to modern Rails naming and design principles. Key issues include the direct implementation of functionalities like sorting reviews and checking reviewer roles within the controller, suggesting a shift towards polymorphism and a more structured approach to code organization. Furthermore, the controller's handling of email notifications and feedback mechanisms is inconsistent, indicating the necessity for a dedicated helper to streamline communication processes. The reimplementation effort must focus on simplifying the controller, adhering to Rails conventions, and improving code readability and maintainability by appropriately distributing responsibilities.


==3.Design Goal==
==3.Design Goal==

Revision as of 02:41, 8 April 2024

CSC/ECE 517 Spring 2024 - E2415: Reimplementation of responses_controller.rb (Design Document)

1.Expertiza

2.Problem Statement

The ResponseController in Expertiza, a legacy system with conventions predating Rails standards, is overly complex, encompassing functionalities beyond basic CRUD operations and needing adherence to modern Rails naming and design principles. Key issues include the direct implementation of functionalities like sorting reviews and checking reviewer roles within the controller, suggesting a shift towards polymorphism and a more structured approach to code organization. Furthermore, the controller's handling of email notifications and feedback mechanisms is inconsistent, indicating the necessity for a dedicated helper to streamline communication processes. The reimplementation effort must focus on simplifying the controller, adhering to Rails conventions, and improving code readability and maintainability by appropriately distributing responsibilities.

3.Design Goal

4.Class UML Diagram

5. Implementation

5.1 Model

Methods within the model were refactored or introduced, including:

  • 5.1.1 set_content
  • 5.1.2 validate_params
  • 5.1.3 serialize_response

5.2 Controller

Controller methods for CRUD operations were enhanced, comprising:

  • 5.2.1 Create
  • 5.2.2 Show
  • 5.2.3 Update
  • 5.2.4 Delete

6. Files Modified/Added

List of primary files modified or created includes:

  • responses_controller.rb
  • response_helper.rb
  • response.rb


7. Test Plan

Testing model methods

Test Coverage

8. Team

8.1 Mentor
  • Ameya Vaichalkar
8.2 Members
  • Jeff Riehle
  • Maday Moya
  • Jacob Leavitt

9. Links

Swagger Video Link:

Pull request:

Model Tests Video:

Controller Tests Video:

References