Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose a more fine-grained API #70

Open
ryanemerson opened this issue Apr 11, 2016 · 1 comment
Open

Expose a more fine-grained API #70

ryanemerson opened this issue Apr 11, 2016 · 1 comment

Comments

@ryanemerson
Copy link
Contributor

Currently all Aphrodite methods are exposed by an Aphrodite instance, this is simple for the user, however this has resulted in Aphrodite.java becoming increasingly bloated.

It could be advantageous to split Aphrodite's interface into multiple sub-managers. For example we could have:

Aphrodite aphrodite = Aphrodite.instance()
IssueTrackerManager isManager = aphrodite.getIssueTrackerManager();
isManager.searchIssues(...);

RepositoryManager repoManager = aphrodite.getRepositoryManager();
repoManager.getPatchesAssociatedWith(...);

...
// Apply to Stream Services as well

Utilising Manager classes in this way, would also allow additional features to be added without further polluting Aphrodite.java. For example, each individual 'Manager' class could expose additional options, such as getIssueTrackerByHost() etc which would allow applications to utilise individual instances of IssueTrackers directly.

@ryanemerson ryanemerson changed the title Utilise a more fine-grained API Expose a more fine-grained API Apr 11, 2016
@elguardian
Copy link
Contributor

I think is better to keep calls like getIssueTrackerByHost() in aphrodite and return some sort of CompositeIssueTrackerService (implementing the IssueTrackerService) than creating a new class like a manager. This way we are always working with the service interfaces.

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

No branches or pull requests

2 participants