-
Notifications
You must be signed in to change notification settings - Fork 28
Add use cases. Refactor WebIDL. #7
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
Conversation
…finitions according to commints in w3c#3. Signed-off-by: Zoltan Kis <[email protected]>
index.html
Outdated
<li>Start the exposed <a>Thing</a> in order to process external requests.</li> | ||
<li>Modify the handling of an external request to retrieve the <a>Thing Description</a>.</li> | ||
<li>React on a property change</li> | ||
<li>Register an action triggered by external retrieve requests on the <a>Thing Description</a>.</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to avoid confusion with the interacion pattern "action" (of a thing) , could we say "a callback" or "logic"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we could use something different. Originally I've used "hook", since it serves a special purpose (server side code executed before/after the implementation invokes an action registered by a client).
However, I have deliberately changed it to "action", since the signature may be the same as for registering an action, and shouldn't it be part of the TD like Actions are?
So if we use a different word, e.g. "hook", it needs to be added to the interaction list, together with Actions, Properties and Events.
Another question: could we model this use case with special events that are triggered locally by a property change or action invocation?
And finally, as also asked in the issue: is there an other way to fulfill the use case?
index.html
Outdated
<li>Start the exposed <a>Thing</a> in order to process external requests.</li> | ||
<li>Modify the handling of an external request to retrieve the <a>Thing Description</a>.</li> | ||
<li>React on a property change</li> | ||
<li>Register an action triggered by external retrieve requests on the <a>Thing Description</a>.</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to avoid confusion with the interacion pattern "action" (of a thing) , could we say "a callback" or "logic"?
What about the following:
However, I still fail the understand the use case for the hooks. These hooks are only used by the same script that defines the server Thing. Why cannot the logic that goes into the hooks go directly into the request handlers? |
…cussion Signed-off-by: Zoltan Kis <[email protected]>
I have reformulated the use cases and moved all observation use cases to consumed Thing. The misunderstanding probably came from the fact that ExposedThing also implements ConsumedThing and in the Current Practices they are just dumped together. |
Added request handlers to |
Signed-off-by: Zoltan Kis <[email protected]>
… ExposedThing properties. Signed-off-by: Zoltan Kis <[email protected]>
Based on this comment I am merging for now. If there is feedback, let's raise them later. |
WebIDL was updated based on comments in #3.
Added some of the use cases mentioned in #6.