CSC/ECE 517 Fall 2022 - E2274: Refactor teams controller.rb: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 1: Line 1:
==Introduction==
==Introduction==
In this project we refactored teams_controller.rb and some tests associated with it. Before we worked on it, teams_controller.rb had some problems that violated some essential Rails design principles. Some methods have been moved to the teams.rb model class. Some duplicate code was removed. We added some comments for readability. And, we fixed tests to be more consistent with the program and execution.
In this project we refactored teams_controller.rb and added tests associated with its functionality. Before we worked on it, teams_controller.rb had some problems that violated some essential Rails design principles. Some methods have been moved to the teams.rb model class. Some duplicate code was removed. We added some comments for readability. And, we fixed tests to be more consistent with the program and execution.


==Previous Work==
==Previous Work==

Revision as of 14:50, 14 November 2022

Introduction

In this project we refactored teams_controller.rb and added tests associated with its functionality. Before we worked on it, teams_controller.rb had some problems that violated some essential Rails design principles. Some methods have been moved to the teams.rb model class. Some duplicate code was removed. We added some comments for readability. And, we fixed tests to be more consistent with the program and execution.

Previous Work

https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2214:_Refactor_teams_controller

https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2022_-_E2254:_Refactor_teams_controller.rb

Issues Being Worked on

  • Add more comments to the controller, briefly explain the functionality of custom methods
  • Find out areas in the code where DRY principle can be applied (For eg. look at create and update methods to find similarity)
  • Try to look at the waitlist functionality and simplify it.
  • Try to look and modify the update function
  • There are few methods team_size, team_parent which look unnecessary
  • Try to update the config/locales/hi_IN.yml hindi text.
  • Try to increase the test coverage.