Skip to content
This repository has been archived by the owner on Dec 26, 2017. It is now read-only.

Technical Debt #11

Open
7 of 9 tasks
AdamVig opened this issue Jun 17, 2016 · 0 comments
Open
7 of 9 tasks

Technical Debt #11

AdamVig opened this issue Jun 17, 2016 · 0 comments
Assignees
Labels

Comments

@AdamVig
Copy link
Owner

AdamVig commented Jun 17, 2016

  • Endpoint names are unnecessarily duplicated between filenames and config.ROUTES. Instead of depending on a list of endpoint names set in config.js, dynamically load endpoints based on their definitions in the routes directory.
  • Endpoints are modular and have little code-duplication, which is a major improvement over the necessary copy-and-pasting to add a new endpoint to the legacy API. However, passing a configuration hash to a centralized function that takes care of creating the endpoints seems backwards. Instead, there should be an Endpoint class defined centrally that is instantiated in each endpoint's definition, and that endpoint should call the function that defines itself on the app object. Exploring ES6's chapter on Classes is an excellent resource on the subject.
  • Testing is severely lacking. The existing regression test is a simplistic approach to ensuring that the API works from the outside, but there is no functional testing to ensure that each function is performing as expected.
    • Test coverage of helper functions located in /helpers.
    • Test coverage of endpoint getter and processor functions with dummy data.
    • Test schema of JSON returned in regression test to ensure that the API is returning the correct types of data.
    • Test API under load conditions.
  • Code formatting is not standardized.
    • Add .jshintrc and .eslintrc and fix all issues that come up (copy files from GoCoStudent).
    • Replace all function () {} with () => {}.
    • Replace any var with either let or const.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant