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

Add link type(s) for UI(s) #87

Open
mmccool opened this issue Oct 1, 2020 · 7 comments
Open

Add link type(s) for UI(s) #87

mmccool opened this issue Oct 1, 2020 · 7 comments

Comments

@mmccool
Copy link
Contributor

mmccool commented Oct 1, 2020

See map use case. Edit: also possibly relevant to Accessibility.

@mmccool mmccool changed the title Add link type for UI Add link type(s) for UI(s) Oct 1, 2020
@relu91
Copy link
Member

relu91 commented Oct 1, 2020

Alternate link type might help here. Example:

{
    "@context": [ "https://www.w3.org/2019/wot/td/v1"],
    "links": [{
        "rel": "alternate",
        "href": "https://servient.example.com/things/lampUI",
        "type": "application/html"
     }]
    ...
}

@egekorkan
Copy link
Contributor

Not sure if this word is semantically correct, I would expect an alternative to the TD, like one for a local network served by a proxy/gateway. At the same time, I don't know of a perfect one since the link relation types are "created" for HTML documents that already are the user interface. I think about can be used by adding another keyword with it which can mean the UI is about the TD/Thing.

@mmccool
Copy link
Contributor Author

mmccool commented Oct 2, 2020

Should discuss link types here and make PRs against https://github.com/w3c/wot-architecture/blob/master/REQUIREMENTS/link-relation-types.md to capture them.

@relu91
Copy link
Member

relu91 commented Oct 2, 2020

Not sure if this word is semantically correct, I would expect an alternative to the TD, like one for a local network served by a proxy/gateway. At the same time, I don't know of a perfect one since the link relation types are "created" for HTML documents that already are the user interface. I think about can be used by adding another keyword with it which can mean the UI is about the TD/Thing.

Agree it is not a super fit. However, the alternate type can be used as a means to convey another representation for a web resource. If we think about a web Thing, it might be described with a Thing Description or an HTML document. Now, since the web is evolved a lot an HTML document is essentially a full-blown UI and I agree that it might be strange to say it is just another way to describe that Web Thing. Still, IMHO people might still use the alternate tag to convey a UI for one WebThing.

However, UI is not only HTML. What about a phone application? we could have a link to that as well. We can:

  • define a totally new set of rel types that can work with both HTML and mobile applications. Consequently, recommend those tags instead of alternate tag
  • Integrate with the alternate tag and add a specific tag only for mobile applications.

relu91 added a commit to relu91/wot-architecture that referenced this issue Oct 14, 2020
Coming from w3c/wot-testing#87, this PR adds two possible link types to point towards WebThing UIs. See [my comment](w3c/wot-testing#87 (comment))
@mmccool
Copy link
Contributor Author

mmccool commented Nov 11, 2020

We should in general, if possible, try to use existing IANA link relation types if they are appropriate, otherwise we should define new ones. Existing IANA types are documented here: https://www.iana.org/assignments/link-relations/link-relations.xhtml
Probably what we should do is state explicitly in the TD spec the use of particular link types for particular purposes. Also as noted above there is a document set up in the wot-usecases repo collecting use cases (and proposed link types) for various purposes. We should probably first try to consolidate suggested link types here: https://github.com/w3c/wot-architecture/blob/master/REQUIREMENTS/link-relation-types.md

@mmccool
Copy link
Contributor Author

mmccool commented Nov 11, 2020

Note also the cross-linked issue in architecture above.

@benfrancis
Copy link
Member

I only just spotted this issue as it's in the wot-testing repo. Could be added to the Thing Description specification as a recommended way for a web thing to provide its own web UI? The example @relu91 gave is exactly what WebThings currently does.

See the example in https://webthings.io/api/#links-member

...
  {
    "rel": "alternate",
    "mediaType": "text/html",
    "href": "/things/lamp"
  }
...

By my understanding of the alternate link relation, this is exactly what it's intended for as it is linking from a JSON representation of a web thing to an alternate HTML representation. This is equivalent to an HTML document linking to an alternate RSS representation of the same resource for example.

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

4 participants