eclipse-thingweb / node-wot

Components for building WoT devices or for interacting with them over various IoT protocols
https://thingweb.io
Other
161 stars 78 forks source link

[question] Naming convention for devices built with node-wot #236

Open egekorkan opened 4 years ago

egekorkan commented 4 years ago

This is mostly to gather opinions:

We have a couple of devices built with node-wot that are for now on GitHub but we will publish them on npm soon. In a similar way to Node-RED packages always named nodered-contrib-mypackage (example https://www.npmjs.com/package/node-red-contrib-io-key), should we also set up a naming convention for node-wot? Here is one simple infrared sensor example: https://github.com/tum-esi/wot-sys/tree/master/Devices/nodewot-infrared-sensor-dobot

I have some ideas below but would like to hear the opinions of others:

  1. @node-wot/contrib/mypackage: Not sure since /contrib after @node-wot makes me think that it is part of the node-wot main package and maintained by node-wot developers, which should not be the case
  2. @node-wot-contrib/mypackage
  3. @node-wot-contrib-mypackage
  4. node-wot-contrib-mypackage: I find this one to be the closest to the way Node-RED does, since an @node-wot associates it with node-wot developers.

Looking forward to ideas/opinions :)

danielpeintner commented 4 years ago

I think the idea is to start with a best practice on how others can publish their contribution.

At the moment our packages look as follows:

This makes me think the following template makes most sense but I do not have a strong opinion either ;-)

relu91 commented 4 years ago

@node-wot/contrib-<contribution-name>

I think that using this pattern people would need the write access for @node-wot organization. Rollup went for this direction too and create a dedicated repository for the most famous supported plugins. However, I think that it creates confusion and it is quite difficult to manage issues/PR.

I would vote for node-wot-contrib-mypackage, but I do not like too much this one either.

erkann-sen commented 4 years ago

node-wot-contrib-mypackage this convention gives an expression like it is a node library extension not a node-wot extension, so I think it would be better to somehow divide node-wot from the ending and what I can offer is putting an underscore like node-wot_contrib-mypackage or @node-wot_contrib-mypackage

egekorkan commented 4 years ago

So the naming scheme will be up to our decision and as long as we all agree on it, it will be fine. One thing that is important to discuss whether we want to differentiate node-wot related packages by their names. So in #267, it is about the Mozilla and OpenHAB tools (?) that allow integration of these platforms to node-wot (Mozilla is almost a binding). Here, it is about Things created with node-wot and if we move Fujitsu and Oracle bindings to another repo, they would be bindings. Thus, we have, at the moment, a need for a naming scheme for the following:

I would say that these should all have a distinct naming scheme to make them easier to find like:

egekorkan commented 4 years ago

Btw in Node-RED, there are nodes, flows and collection but only nodes follow a naming scheme. See their library: https://flows.nodered.org/?num_pages=1

danielpeintner commented 3 years ago

see also external bindings: e.g., https://github.com/eclipse/thingweb.node-wot/pull/372