RE: ActionHandlers vs "App resources" (was: An updated draft of the schema.org/Action proposal)

On Monday, March 03, 2014 7:11 PM, Sam Goto wrote:
> On Mon, Mar 3, 2014 at 9:36 AM, Markus Lanthaler wrote:
> > You'd have specific action handlers attached to the action. Example
> > (of a Movie that can be "watched" on android and "bought" via a
> > webpage):
> >
> > {
> > @type: Movie
> > action: [{
> >   @type: WatchAction
> >   handler: {
> >     @type: AndroidHandler
> >   }
> > }, {
> >   @type: BuyAction
> >    handler: {
> >      @type: WebPageHandler
> >   }
> > }
> > ]
> > }
> >
> > How would we go about this using sameAs/alternate?
>
> You would use a very similar pattern (adapting your previous example):
>
> {
>  "@context": "http://schema.org",
>  "@id": "http://example.com/web/resource",
>  "alternate": [ {
>      "@type": "AndroidAppLink",
>      "operation": {
>        "@type": "WatchAction"
>    }, {
>      "@type": "ApiLink",
>      "operation": {
>        "@type": "BuyAction"
>    }
>  ]
> }
>
> Hum ... this doesn't seem right to me ... I wasn't expecting actions to
> be attached to these "Links", since there is a difference between "watching"
> a movie and "watching" a link.

Right, I just reused your terminology to show the pattern. I wouldn't call those things *Link as a link is an arc between two resources and not a single resource as these things here are. Would it look better to you if you would replace, e.g. AndroidAppLink with AndroidAppResource?
 


Cheers,
Markus


--
Markus Lanthaler
@markuslanthaler

Received on Monday, 3 March 2014 18:35:15 UTC