Skip to content
This repository was archived by the owner on Dec 30, 2020. It is now read-only.

Refactor Logs

Ben Vincent edited this page Apr 8, 2014 · 3 revisions

Adapter Refactors

Jdeoderant made no suggestions for refactors.

Controller Refactors

  • extracted EditPostController edit bimap size to method
  • extracted CommentModelController comment setting into method
  • extracted PostListController sorting into classes

These refactors cleaned up some smaller chunks of code and extracted actions into small class utility functions. The only larger refactor is the extraction of the sort methods into subclasses. This refactor allow the sorting to be done by the elasticsearch and by the subclasses them selves. This eliminates the switch block originally used.

Model Refactors

  • extracted DummyPostListFactory topic populating into a method
  • extracted DummyPostListFactory comment populating into a method

These refactors are simply moving topic and comment populating code into callable functions. These refactors are almost useless since these functions are only called for testing and building dummy objects.

Provider Refactors

Since the providers deal with the fairly complex subject of elastic search and since the extractions considered where only method extraction we decided to leave them to maintain a familiarity with the code.

View Refactors

The view refactors were ignored for much the same reason as the Provider refactors. Though arguably easier they still would require tampering with code better left un-touched.

Clone this wiki locally