CSC/ECE 517 Spring 2015/oss E1504 IMV: Difference between revisions
No edit summary |
No edit summary |
||
Line 24: | Line 24: | ||
'''What needs to be done:''' | '''What needs to be done:''' | ||
The search methods in bookmarks model are being used used in a very granular level. This led to redundancy in bookmarks search methods. These methods include <i>search_alltags_allusers, search_fortags_allusers, search_fortags_forusers, search_alltags_forusers</i>. Hence duplicacies in these methods are to be singled out. | The search methods in bookmarks model are being used used in a very granular level. This led to redundancy in bookmarks search methods. These methods include <i>search_alltags_allusers, search_fortags_allusers, search_fortags_forusers, search_alltags_forusers</i>. Hence duplicacies in these methods are to be singled out. As we know, in ruby, the method name should specify the pseudo use of itself. Here, <i>add_new_bookmark </i> misleads as this is one of the CRUB method and the naming convention is not quite right. It has to be renamed to create method. | ||
Revision as of 07:03, 21 March 2015
E1504. Refactoring the Bookmark Model
This page provides a description of the Expertiza based OSS project. This team project successfully refactored the Bookmark Model by removing the duplicate code, combining the methods, improving the search function, moving Bmapping model methods to their respective class, covering dependencies associated with changed segments and adding a User Interface for using bookmarks.
Introduction to Expertiza
Expertiza is a project developed using the 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 an open source application and the code can be cloned from GitHub. This application provides an efficient way to manage assignments, grades and reviews, which makes the process easier and faster when the class strength is large.
Expertiza is supported by National Science Foundation under Grant No. 0536558. Additional funding from the NCSU Learning in a Technology-Rich Environment (LITRE) program, the NCSU Faculty Center for Teaching and Learning, the NCSU STEM Initiative, and the Center for Advanced Computing and Communication.
Problem Statement
Classes involved:
bookmark.rb bmapping.rb bookmarks_controller.rb auth_controller.rb auth_helper.rb
What they do: The bookmark model and controller help in creating user specific bookmarks, which can be added to topics. Also, they provide the functionality to edit these bookmarks by the created user. These bookmarks are searchable based on users and tags.
What needs to be done: The search methods in bookmarks model are being used used in a very granular level. This led to redundancy in bookmarks search methods. These methods include search_alltags_allusers, search_fortags_allusers, search_fortags_forusers, search_alltags_forusers. Hence duplicacies in these methods are to be singled out. As we know, in ruby, the method name should specify the pseudo use of itself. Here, add_new_bookmark misleads as this is one of the CRUB method and the naming convention is not quite right. It has to be renamed to create method.
Changes Made
Bookmark Model
Method Name | Changes Made | Reason For Change |
---|---|---|
create | ---------------- | ----------- |
update | ----------------- | -------- |
edit | -------------- | --------- |
destroy |
----------------- | --------- |
--------------- | ---------- | |
---------- | ---------- |
Bookmark Controller
Method Name | Changes Made | Reason For Change |
---|---|---|
create | ---------------- | ----------- |
update | ----------------- | -------- |
edit | -------------- | --------- |
destroy |
----------------- | --------- |
--------------- | ---------- | |
---------- | ---------- |
Views
Method Name | Changes Made | Reason For Change |
---|---|---|
create | ---------------- | ----------- |
update | ----------------- | -------- |
edit | -------------- | --------- |
destroy |
----------------- | --------- |
--------------- | ---------- | |
---------- | ---------- |