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

Make ServiceProvider to no longer extend from EventEmitter #11

Open
joshuamarquez opened this issue Mar 1, 2017 · 0 comments
Open

Make ServiceProvider to no longer extend from EventEmitter #11

joshuamarquez opened this issue Mar 1, 2017 · 0 comments
Assignees

Comments

@joshuamarquez
Copy link
Contributor

I believe that extending from EventEmitter in ServiceProvider might not be necessary if we implement callbacks for communication between ServiceEmitter + ServiceProvider + CustomProvider. Using callbacks would be a cleaner and better implementation of ServiceProvider since ServiceEmitter is also extending from EventEmitter.

How so? well what if instead of listening wantsData event in some custom emitter we just override a method from ServiceProvider maybe called with the same name of the event (onWantsData())? the same could happen for data and error events used in ServiceEmitter.

@joshuamarquez joshuamarquez self-assigned this May 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant