Discuss the modularization of WoT scripts
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 45
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
Many WoT scripts on the client side are likely to be reusable across applications, in a similar fashion to Node-RED modules. For instance, control loop between sensors and actuators (temperature sensor vs. thermostat, brightness sensor vs. light switch, flow sensor vs. pump, etc.) could be implemented generically and instantiated for specific Things.
Standardizing a module mechanism for WoT would seem redundant with e.g. ES6 Modules. However, a way to annotate scripts with safety conditions may be an interesting feature. Safety conditions could be TD templates (e.g. expressed as JSON-LD frames), to constrain TDs to be consumed by the script. If consumed TDs do not match the template, an error could be thrown.
See also my position statement at the 2019 WoT workshop.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository files, tests, or entry points are identified. Start by reviewing the proposed reuse of ES6 Modules and the linked JSON-LD framing specification, then assess how safety conditions could constrain consumed Thing Descriptions. Done would require an agreed modularization and safety-condition design.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100