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 method names & events consistent between client and server #42

Open
inator opened this issue Jan 13, 2017 · 2 comments
Open

Make method names & events consistent between client and server #42

inator opened this issue Jan 13, 2017 · 2 comments

Comments

@inator
Copy link
Contributor

inator commented Jan 13, 2017

See hoodiehq/camp#100 (comment)

@inator
Copy link
Contributor Author

inator commented Jan 16, 2017

@gr2m & @mbad0la - thoughts on this? I suggest we could make these changes:

task.on('start', function(object, options) {})  // was 'add'
task.on('update', function(object, options) {})  // stays the same
task.on('stop', function(object, options) {}) // was 'remove'
task.on('change', function(eventName, object, options) {}) // stays the same

Note, we conceptualized a .restart() task-client method, so at some point we'll have to consider somehow firing a restart event as well, but that's for another issue.

@gr2m
Copy link
Member

gr2m commented Jan 16, 2017

instead of update I suggest progress.
instead of stop I suggest success.
Let’s add error to the list.

The change event is good! There might be changes that neither start, nor progress, success or error. For that case we have different options

  1. don’t emit a change event at all
  2. set eventName to null
  3. set eventName to update

I would suggest we postpone the change event for now, just like we do with restart. We don’t need it for a first iteration

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