solid / solid-spec

Solid specification draft 0.7.0
Creative Commons Zero v1.0 Universal
1.13k stars 103 forks source link

Can we have some sort of "open with" predicate? #126

Open JornWildt opened 5 years ago

JornWildt commented 5 years ago

This is a copy from https://github.com/solid/node-solid-server/issues/944.

Would it be possible to define a predicate that tells the Solid server how to "open" a specific piece of data? Or does such a thing exist already?

Example: I have a web-app that stores data about an RC model at http://my-pod/models/1234. If someone opens that URL they will see the generic data-browser linked data representation of the resource. Now I would like to enable a "Open" or "Show" button in the data-browser by adding a statement like this:

[<http://my-pod/models/1234>, <opens-with>, <http://the-web-app/models?src=http%3A%2F%2Fmy-pod%2Fmodels%2F1234>]

See also discussion at https://forum.solidproject.org/t/whats-in-a-link/618

JornWildt commented 5 years ago

Things like https://github.com/solid/solid/blob/master/proposals/data-discovery.md, https://www.w3.org/TR/activitystreams-vocabulary/ and https://github.com/solid/solid/blob/master/proposals/app-discovery.md was suggested in the previous thread.

JornWildt commented 5 years ago

One easy-peasy way to solve this issue, would be to add a link like the one above to each of the resources:

[<http://my-resource>, <do:Click-here-to-open>, <http://the-best-app>]

Given that the current incarnation of the data browser strips the namespace prefix "do:" and replaces dashes with spaces, the end user would be presented with a statement that says "Click here to open" ... I guess most people would try that and get used to it working :-)

JornWildt commented 5 years ago

I do although think a better long term solution would be to let apps register URL templates for data types (as discussed in the linked solid/node-solid-server#944).

The data browser would then, for each type found, look up the user's "open with" URL template, and if such was found, merge the subject URL into the template and present the user with an "Open" link-button.

That would be equivalent to how the Windows file system registers "Open with" applications for file-extensions.

RubenVerborgh commented 5 years ago

We probably want to get this right the first time. Links per resource will not scale.

angelo-v commented 5 years ago

I would prefer to assign an app per rdf type in my solid profile, so each user can decide herself which apps to use, similar how the type index tells where to store data of a type

Ryuno-Ki commented 5 years ago

Is that similiar to Navigator. RegisterProtocolHandler which is used on some apps?

(Haven't checked out the links in this thread)