W3C home > Mailing lists > Public > public-vocabs@w3.org > March 2014

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

From: Sam Goto <goto@google.com>
Date: Tue, 4 Mar 2014 13:27:26 -0800
Message-ID: <CAMtUnc73C_4OXjuKjxE+9Bs=sQ5a=uMREjrJb0mPL08fhXYFgQ@mail.gmail.com>
To: Markus Lanthaler <markus.lanthaler@gmx.net>
Cc: Jason Johnson <jasjoh@microsoft.com>, W3C Web Schemas Task Force <public-vocabs@w3.org>, "public-hydra@w3.org" <public-hydra@w3.org>
A co-worker and I went over some of these points yesterday.

Here<http://schema-drafts.appspot.com/Thing?draft=http://pastebin.com/raw.php?i=C6L29uQh>is
a *preliminary* build with the ideas we went over here written down:

- In this *test* build, we remove the concept of ActionHandler.
- As a replacement, we instead allow
Thing.url<http://schema-drafts.appspot.com/url?draft=http://pastebin.com/raw.php?i=C6L29uQh>
to
point us to platform-specific
Deeplink<http://schema-drafts.appspot.com/Deeplink?draft=http://pastebin.com/raw.php?i=C6L29uQh>
(e.g.
AndroidDeeplink<http://schema-drafts.appspot.com/AndroidDeeplink?draft=http://pastebin.com/raw.php?i=C6L29uQh>,
ApiDeeplink<http://schema-drafts.appspot.com/ApiDeeplink?draft=http://pastebin.com/raw.php?i=C6L29uQh>
and
WindowsDeeplink<http://schema-drafts.appspot.com/WindowsDeeplink?draft=http://pastebin.com/raw.php?i=C6L29uQh>
)
- Without ActionHandlers, it felt awkward to have things like
expects/returns in the
Action<http://schema-drafts.appspot.com/Action?draft=http://pastebin.com/raw.php?i=C6L29uQh>types,
so we've created a specific type to carry these service-y
information, called
ResourceOperation<http://schema-drafts.appspot.com/ResourceOperation?draft=http://pastebin.com/raw.php?i=C6L29uQh>
where
expects<http://schema-drafts.appspot.com/expects?draft=http://pastebin.com/raw.php?i=C6L29uQh>
/returns<http://schema-drafts.appspot.com/returns?draft=http://pastebin.com/raw.php?i=C6L29uQh>live.
- The semantics of the operation are still dictated by the Action types,
via performsAction<http://schema-drafts.appspot.com/performsAction?draft=http://pastebin.com/raw.php?i=C6L29uQh>
attached
to ResourceOperation.
- That also allows us to remove ActionStatus, leaving the Action subtypes
to carry past-actions-like semantics and ResourceOperation to take
advantage of the Action sub-type's semantics on proposed actions.

WDYT?


On Tue, Mar 4, 2014 at 7:30 AM, Markus Lanthaler
<markus.lanthaler@gmx.net>wrote:

> On Monday, March 03, 2014 11:40 PM, Sam Goto wrote:
> > On Mon, Mar 3, 2014 at 10:34 AM, Markus Lanthaler wrote:
> > > 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?
> >
> > That's still a bit awkward. You'd want to have a WatchAction attached
> > to a Movie, rather than a generic AndroidAppResource (which may refer
> > to any type).
>
> Can't it be both at the same time? I hope we are not heading down the
> httpRange-14 path now :-)
>
>
>
> Cheers,
> Markus
>
>
> --
> Markus Lanthaler
> @markuslanthaler
>
>
Received on Tuesday, 4 March 2014 21:27:53 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:29:37 UTC