Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Refactor endpoint service #373

Closed
AdamVig opened this issue Oct 22, 2017 · 0 comments
Closed

Refactor endpoint service #373

AdamVig opened this issue Oct 22, 2017 · 0 comments
Assignees

Comments

@AdamVig
Copy link
Collaborator

AdamVig commented Oct 22, 2017

The endpoint service currently abstracts the use of the database service. Because of this, all of the parameters passed to endpoint service methods are all passed to the database service.

This is an example of the "Middle Man" code smell. To fix it, one can use Remove Middle Man.

A better pattern would be to pass a query from the database service to the endpoint service, which would reduce the signature of every endpoint service call to just a single query parameter.

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