Schema.org update & summer break

Hi folks,

Schema.org has now added Actions [1] to their vocabulary (here's the full
list [2]. As the examples show, they are the moment just used to describe
past actions (similar to Activity Streams [3]). Meanwhile the Activity
Streams published a first draft of the next JSON Activity Streams version
[4] which will be based on JSON-LD. That means that the next version of
Activity Streams is probably nicely aligned with Schema.org.

The next on step of Schema.org will be to tackle potential future actions,
i.e., a description of potential actions a client might want to perform.
This is where Hydra comes into play. Hydra's operations map 1:1 to
Schema.org actions and thus it would make a lot of sense to collaborate with
Schema.org. I've already reviewed [5] an early draft of their work [6].
Unfortunately I never got a response to that mail (I'll ask for an answer
again in a couple of minutes). The only reaction to was the withdrawal of
that proposal and the concentration on past actions.

I think Hydra handles all the use cases presented by Schema.org so far quite
nicely, the only thing that we really should discuss is how to handle
one-click actions. For example, look at how GMail describes a RSVP action
[7]:

{
  "@context": "http://schema.org",
  "@type": "Event",
  "name": "John's Birthday Party",
  ... information about the event ...
  "action": {
    "@type": "RsvpAction",
    "actionHandler": {
      "@type": "HttpActionHandler",
      "url": "https://events-organizer.com/rsvp?eventId=123",
      "method": "POST",
      "requiredProperty": "rsvpStatus",
    }
  }
}

In Hydra, at the moment you would have to do something like

{
  "@context": ... for Hydra and schema.org ...,
  "@type": "Event",
  "name": "John's Birthday Party",
  ... information about the event ...
  "rsvp": { 
    "@id": "https://events-organizer.com/rsvp?eventId=123"
    "operations": {
      "@type": "RsvpAction",
      "method": "POST",
      "expects": {
        "supportedProperties": {
          "property": "rsvpStatus",
          "required": true
        }
      }
    }
  }
}

The "expects" part could be replaced by a class instead of defining the
supported properties inline, something like "expects": "RsvpResponse". So
the only thing that isn't really as elegant as GMails example is that Hydra
needs a specific property "rsvp" instead of just "actions". This is
essentially a specialized link relation. The advantage is that it allows us
to associate the supported operations directly to the definition of the link
relation so that example could really be simplified to

{
  "@context": ... for Hydra and schema.org ...,
  "@type": "Event",
  "name": "John's Birthday Party",
  ... information about the event ...
  "rsvp": "https://events-organizer.com/rsvp?eventId=123"
}

But that means that a client either needs to know how "rsvp" is defined or
look it up (which generally shouldn't be a problem). Some may wonder why we
can't use hydra:operation or hydra:supportedOperations in a similar way to
GMail's "action" property. The reason is that hydra:operation is defined to
specify the operation of the current resource as the example above
illustrates. On the other hand, hydra:supportedOperations is defined to
describe the operations allowed by instances of a specific class or values
of specific properties (link targets).

So a couple questions:
  - should we rename Hydra's operations to actions to align with schema.org
(ISSUE-2 [8])
  - do we need another property similar to GMail's "action"? (ISSUE-3 [9])
  - is there a way to simplify this even further?

I some more questions and ideas regarding some other topics but
unfortunately I have been hit by an avalanche of work. Due to that and the
fact that probably a lot of people are on vacation these weeks I think it
makes sense to more or less have a summer break. I would propose to resume
our work mid/end September. Please don't get me wrong, if there's something
you want to discuss please do post to the mailing list by any means. I will
respond at any mail I'll see. I just won't push new topics till the end of
September.


Enjoy the nice weather,
Markus


[1] http://schema.org/Action
[2] http://schema.org/docs/full.html#Action
[3] http://activitystrea.ms/
[4] http://tools.ietf.org/html/draft-snell-activitystreams-02
[5] http://lists.w3.org/Archives/Public/public-vocabs/2013Jun/0044.html
[6] http://www.w3.org/wiki/images/3/38/ActionsinSchema.org2013-05-11.pdf
[7]
https://developers.google.com/gmail/schemas/actions/declaring-actions#in-app
_actions
[8] https://github.com/HydraCG/Specifications/issues/2
[9] https://github.com/HydraCG/Specifications/issues/3



--
Markus Lanthaler
@markuslanthaler

Received on Friday, 16 August 2013 14:25:37 UTC