Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Refactor Services to Improve Testability #16

Open
penp3n opened this issue Mar 19, 2018 · 1 comment
Open

Refactor Services to Improve Testability #16

penp3n opened this issue Mar 19, 2018 · 1 comment

Comments

@penp3n
Copy link
Contributor

penp3n commented Mar 19, 2018

We should refactor the code is search.js to be more testable. Namely, we just make dependencies injectable and grab values our of configuration rather than using hard-coded values.

@penp3n penp3n self-assigned this Mar 19, 2018
@penp3n
Copy link
Contributor Author

penp3n commented Mar 21, 2018

My plan is to create a services directory that contains three services:

  • AppService: provide services needed by the UI (search, viewResultDetail, export results, etc)
  • PubMedService: abstraction around the PubMed EUtils APIs
  • DemographicsService: provide methods for retrieving demographic info for articles and filtering by demographic criteria

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant