-
Notifications
You must be signed in to change notification settings - Fork 8
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
Remove or re-work section 6.1.2 Links #255
Comments
The intention is to have a restricted set of feature that consumers must be prepared to handle. A consumer without a screen certainly is not able to render any icons, but it might be able to print PDF documents. Others may just ignore these.
We could also include SVG, however, since SVG rendering is more costly to implement, we should require PNG or JPEG to have a fallback icon.
Wheter TMs should be included in the profile is yet an open question.
see above.
It depends on the use cases and capabilites of the consumer. In some scenarios a drill down into collection members may be desirable, in others this might be not the case.
Great question. My assumption was that we have TDs as items. Do you see others?
Should be discussed in a call.
See comments above. Let's discuss in the next call.
The intention of this section is to have a finite set with clear semantics. Consumer behavior depends on uses cases and capabilities (e.g. whether they have a screen, rendering engine for specific types, wheter the use cases require to prender documents, e.g. user manuals ...) |
@mlagally wrote:
I understand and agree with the objective, but I don't think the specification does or can achieve this, because of the ambiguity in what "handle" actually means and the difference in capabilities of different consumers.
If they can be ignored then supporting them is not mandatory. If it's not mandatory then it's only a recommendation, which is already provided by the Thing Description specification.
I don't really agree with this, but the important point is that some consumers may not be able to render any icons because they don't have a graphical display to render them to. E.g. think of a command-line tool or software library which acts as a WoT consumer.
The consensus so far seems to be to exclude them altogether (see #242), but this section appears to say that supporting at least the link relation part of Thing Models is mandatory.
Can you be more explicit? What would a consumer need to implement in order to comply with this assertion, and how would we write a test to verify that it has?
No, but I'm also not sure about what Consumers need to implement in order to support Thing Descriptions as items.
Again, if the behaviour depends on use cases, how can it be tested?
In conclusion, I understand and agree with the objective but I don't think the current text can or does achieve this. Unless we can be much more explicit about what implementing these different types of link relations involves, to the extent that they can be tested in an implementation report, I think we may have to remove this section. Perhaps the current recommendations in the Thing Description specification are enough. |
There seems to be a misconception about interoperability testing / conformance of the consumer. Consumers have different capabilities, some have a screen, others don't. The profile compliant TD must support both, i.e. include icons that can be rendered on devices with a screen. |
@mlagally wrote:
I don't there's a misconception, this is my understanding too. What I'm saying is that the assertions in the specification have to be implementable, and testable.
But that isn't what the current text says. It says: "The following keywords are defined for the HTTP profiles and MUST be supported by all consumers." What would "supporting" links to icons involve, if not rendering them on a screen?
Again, using only those links which match the capabilities of the consumer is very different to what the text currently says. It says that Consumers MUST support all of the keywords, of which |
@benfrancis |
@mlagally wrote:
@mlagally In #273 you asked me to create a PR to address the concerns I raised in #255. As I explained in the PR description of #289, removing the section is the only way I can think of to resolve those concerns, but I am open to alternative proposals because I like the underlying idea - I just don't think it can be specified in a way which is implementable in all consumers. |
Perhaps another direction for this section would be to identify particular combinations of link relation types and media types which should be interpreted in a particular way. For example:
|
Thank you for including some more testable assertions in the style I suggested above. However, I am currently writing implementation reports for two WoT Profile implementations and I'm still having difficulty in testing the other assertions in this section. 5.6 Links
What is the intended meaning of this assertion? Because of the way the assertion is worded it doesn't really have any effect, since the Thing Description specification already implies that Thing Descriptions "may" use these terms. The inclusion of the Is the intention that members other than those listed in the table are allowed in Link objects (already true), that Things must only use these members (if so why?), that they must only use these members if the provided constraints are observed, or that Things must always use these members (not actually what the assertion says)? Does "following keywords" refer only to the first table in section 5.6 (which has a column header "Keyword") or also to the table in section 5.6.1 (which does not have the "Keyword" header)?
Does "keywords" mean members of the Link object, or values of the
What is meant by "link types"? Does it mean "link relation types" from section 5.6.1? If so should the assertion be in that section? Again, links may already be ignored by all Consumers not only profile-compliant Consumers. What additional constraint is intended to be communicated here? 5.6.1 Link Relation TypesThere is no assertion in this section, so it's not clear how to test it. The table appears to define constraints on how certain relation types are used, but it's very ambiguous about how a Thing or a Consumer would implement these constraints. E.g. Is it mandatory for a Consumer to support icons with the format 5.6.2 Media Types for Link Targets
As above, this assertion does not really have any effect on its own, since these types "may" be used by any Thing Description. Is the intended meaning that Things should only use these media types (if so, why?), or that Consumers should try to support them all (probably not practical)?
Again, this assertion only allows something which is already allowed and states what is not defined, not what is. What is the intended meaning? In conclusion, a lot of the content in this section is still quite ambiguous and difficult to test. I can think of a couple of ways to improve it:
The former would be the quickest fix. If the latter is preferred, I can try to find time to draft some replacement text. See also: |
I'm sorry I'm only just getting to review this after PR #240 has already landed.
@mlagally Did you take into account the previous discussion on this topic in #114?
Review comments below.
6.1.2 Links
In principle I like the idea of defining a finite set of link relation types which Consumers MUST support and Producers MAY use, but I'm not sure how it can work in practice (see below).
What does "keywords" mean here? Does it mean Consumers must support all of the included members of the link object, and all of the listed link relation types? I'm going to assume that's the case.
WebThings currently uses links to link to WebSocket endpoints, which don't have a
type
member, just ahref
and arel
member, because the type member wouldn't make sense.We are discussing changing these links to forms, but there are still unresolved issues in the Thing Description specification which may prevent that (see w3c/wot-thing-description#1324).
I suggest it would be fine for
type
to remain optional as in the Thing Description specification. It being mandatory doesn't really gain anything anyway as far as I can tell (see below).I see there's already an issue filed to make this optional, which I agree with.
6.1.2.1 Link Relation Types
How would all of the assertions in this section be tested?
What does it mean have mandatory support for icons? What if a Consumer doesn't have a screen on which to render an icon? The specification limits icons to PNG and JPEG. What about WEBP, GIF and SVG, which are also widely supported on the web? For WebThings we prefer SVG icons for Things so that they are scaleable, so would want SVG support and the "any" value for sizes.
What does a Consumer actually need to do with this kind of link in order to be conformant? My understanding is that Thing Models are only used internally by applications for generating Thing Descriptions and are not intended to be used by Consumers in any way.
Again, what if a Consumer can't render, Markdown, HTML or PDF files?
What would the mandatory type value be for this kind of link relation? Does it have to be a Thing Description, a Directory Description, or can it be any kind of resource? (See: w3c/wot-thing-description#1567).
What must a Consumer do with this kind of link relation in order to be compliant? Present a clickable link to the collection to the user? What happens when the user clicks that link? What if there is no user interface?
Does the target type have to be a Thing Description? What must a Consumer do with this kind of link relation in order to be compliant?
6.1.2.2 Media Types for Link Targets
What must a Consumer do with these links in order to comply with this assertion? This seems like quite an arbitrary list and I have many questions.
Does a Consumer have to be able to render text, HTML and PDF documents? Do all Consumers have to have a web rendering engine in order to render HTML? What if they don't have a screen?
Do all Consumers need to implement a markdown renderer? Which version of markdown? There are many.
What must a Consumer do with machine-readable JSON files, Thing Descriptions and octet streams?
Must a Consumer be able to render JPEGs and PNGs? What if it doesn't have a screen?
In WebThings, aside from the WebSocket links which we would like to replace with Forms, our main use case for Links is providing a link to an HTML user interface for a Thing, which is the example I provided in #114. E.g.:
I would like it if we could make support for this part of the HTTP Profiles, but again what would it mean that it is mandatory for all Consumers to support this? What happens if a Consumer can't render an HTML page?
In conclusion, whilst in principle I like the idea of a finite set of link relation types that Consumers MUST support and Producers MAY use, in practice I'm not sure it would actually work. I'm struggling to imagine how these assertions can be implemented, or tested.
The text was updated successfully, but these errors were encountered: