CSC/ECE 517 Fall 2013/oss E804 spb: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
(Created page with "== Introduction == A way to query db models to return scores, without UI changes == Project Description == '''Classes:''' <br>models/score.rb (159 lines) <br>g...")
 
No edit summary
Line 1: Line 1:
Expertiza Code Refactoring
__TOC__
== Introduction ==
== Introduction ==


Line 6: Line 10:
== Project Description ==
== Project Description ==


'''Classes:''' <br>models/score.rb (159 lines)
'''Classes:'''  
              <br>grades_controller.rb (241 lines)
models/score.rb (159 lines)
grades_controller.rb (241 lines)


'''What needs to be done:''' <br>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.
'''What needs to be done:'''  
.Need to refactor the score.rb model which contains complex methods.
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.

Revision as of 04:42, 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.