CSC/ECE 517 Fall 2014/OSS E1464 vnn: Difference between revisions
(Created page with "= E1464: Refactoring User model = The requirements provided for the Open Source System project of Expertiza were as follows : <br> '''Classes''': <br> ''user.rb'' (295 lines)<br>...") |
|||
Line 13: | Line 13: | ||
*Using {} and [] instead of Hash.new and Array.new | *Using {} and [] instead of Hash.new and Array.new | ||
*Not instantiating more than 1 instance variable per action | *Not instantiating more than 1 instance variable per action | ||
'''Introduction to Expertiza'''<br> | |||
[http://expertiza.ncsu.edu/ Expertiza] is a project developed using Ruby on Rails platform. It provides features like peer review, team assignments and submission of projects. This can be achieved by submitting code base, URL of hosted code on remote server and Wiki submissions. It is open source application and the code can be cloned from [https://github.com/expertiza/expertiza github]. This application provides an efficient way to manage assignments, grades and reviews. This makes the process easier and faster when the class strength is large. |
Revision as of 18:32, 29 October 2014
E1464: Refactoring User model
The requirements provided for the Open Source System project of Expertiza were as follows :
Classes:
user.rb (295 lines)
What they do:
This model helps the user log in and checks whether the user is a student, admin or a super admin. It also helps reset passwords and assign instrcutors to the user.
What is needed:
- Writing proper getters/setters if necessary, otherwise remove getters/setters
- Replacing inefficient boolean logic (`if true` is not conditional)
- Replacing old-style ActiveRecord queries
- Using {} and [] instead of Hash.new and Array.new
- Not instantiating more than 1 instance variable per action
Introduction to Expertiza
Expertiza is a project developed using Ruby on Rails platform. It provides features like peer review, team assignments and submission of projects. This can be achieved by submitting code base, URL of hosted code on remote server and Wiki submissions. It is open source application and the code can be cloned from github. This application provides an efficient way to manage assignments, grades and reviews. This makes the process easier and faster when the class strength is large.