CSC/ECE 517 Fall 2013/oss E804 spb: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 11: | Line 11: | ||
'''Classes:''' | '''Classes:''' | ||
models/score.rb (159 lines) | :models/score.rb (159 lines) | ||
grades_controller.rb (241 lines) | :grades_controller.rb (241 lines) | ||
'''What needs to be done:''' | '''What needs to be done:''' | ||
This code is very slow, due to many factors. Two of the most prominent are the fact that separate db queries are used for each rubric that has been filled out by anyone associated with the assignment; these queries are made sequentially while the HTML page is being written; and the fact that HTML for the whole page is generated, largely by controller methods, before anything is displayed. | :This code is very slow, due to many factors. Two of the most prominent are the fact that separate db queries are used for each rubric that has been filled out by anyone associated with the assignment; these queries are made sequentially while the HTML page is being written; and the fact that HTML for the whole page is generated, largely by controller methods, before anything is displayed. | ||
Need to refactor the score.rb model which contains complex methods. | Need to refactor the score.rb model which contains complex methods. |
Revision as of 04:43, 30 October 2013
Expertiza Code Refactoring
Introduction
A way to query db models to return scores, without UI changes
Project Description
Classes:
- models/score.rb (159 lines)
- grades_controller.rb (241 lines)
What needs to be done:
- This code is very slow, due to many factors. Two of the most prominent are the fact that separate db queries are used for each rubric that has been filled out by anyone associated with the assignment; these queries are made sequentially while the HTML page is being written; and the fact that HTML for the whole page is generated, largely by controller methods, before anything is displayed.
Need to refactor the score.rb model which contains complex methods.