Socialwg/Vocabulary Comparison

From W3C Wiki

This page documents vocabularies being used to publish social content on the web and is part of the socialwg effort.

Activity Streams 2.0

See Activity_Streams/Examples for real world examples to analyze.

Action (aka Activity)

Microformats

Social content publishing real world examples to analyze:

Search Engines support

Other vocabularies

Vocabularies which are not actively being used to publish social content on the web are documented here, as research background.

Schema.org

Action

Comparing AS and Schema

Comparing Activity Streams / Schema.org / Hydra

http://lists.w3.org/Archives/Public/public-socialweb/2014Sep/0006.html (top-posted, please read from the bottom)

The differences are mostly in syntax, but some in model. schema.org/Actions tends to define the Actions semantically.. that is, "WatchAction", "ViewAction", etc. The AS2 Action Handlers spec, on the other hand, defines things like "HttpAction", "ViewAction" (where View here effectively means opening a browser). It's a subtle difference but it does an an effect on how the JSON is processed. The effect is that in the AS2 approach, there is a bit more separation between the Verb identifier and the Action descriptions themselves, but not much.

James M Snell, http://lists.w3.org/Archives/Public/public-socialweb/2014Sep/0007.html

By "conflict" you mean they use a different term (actions vs. potentialAction), right? Semantically they are equivalent AFAICT.

Hydra currently uses the term "operation" for this but we discussed to change it to "action" as well in the past [2].

In any case, Hydra follows a slightly different approach in that it describes the actions/operations supported by a web resource and not by an abstract thing. The model is

  {
    "@id": "http://example.com/my-resource",
    "@type": "Note",
    ...
    "operation": {
         "@type": "DeleteAction",    // multiple operations are supported
         "method": "DELETE"
    }
  }

whereas with AS this would look somewhat like this I think

  {
    "objectType": "note",
    ...
    "actions": {
      "delete": {
        "objectType": "HttpActionHandler",
        "url": " http://example.com/my-resource ",
        "method": "DELETE"
      }
    }
  }

The reason for this is that Hydra is primarily intended for RESTful Web APIs. You could of course use two separate resources as well, but then you'd need to "connect" them somehow.

Markus Lanthaler, http://lists.w3.org/Archives/Public/public-social-interest/2014Sep/0015.html


as:Activity || schema:Action

as:Activity schema:Action
verb
Identifies the type of the activity. The value must be a Type Value. If the verb is not specified, the activity must contain an objectType. Uses sub types of Action, eg. ReadAction, CookAction see full tree at http://schema.org/docs/full.html
actor agent
Describes one or more entities that either performed or are expected to perform the activity. The Value must be a Link Value. The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book.
object object
Describes the direct object of the activity. For instance, in the activity "John saved a movie to his wishlist", the object of the activity is the movie saved. An activity should contain an object property. The value must be a Link Value. The object upon the action is carried out, whose state is kept intact or changed. Also known as the semantic roles patient, affected or undergoer (which change their state) or theme (which doesn't). e.g. John read *a book*.
result result
Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource. The result produced in the action. e.g. John wrote *a book*.
target recipient / purpose
Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the verb but will often be the object of the English preposition "to". For instance, in the activity "John saved a movie to his wishlist", the target of the activity is John's wishlist. The value must be a Link Value. recipient: A sub property of participant. The participant who is at the receiving end of the action.
purpose: A goal towards an action is taken. Can be concrete or abstract.
using target
Describes one or more PotentialActionHandler instances that can be used to carry out a particular PotentialAction. Indicates a target EntryPoint for an Action.
participant participant
A Link Value that describes one or more additional actors that have (or will have) participated in the activity. For instance, in the activity, "Sally went to the movies with Joe", Sally is the primary actor, while Joe is a participant. Other co-agents that participated in the action indirectly. e.g. John wrote a book with *Steve*.
instrument instrument
A Link Value that describes one or more objects used to perform the activity. For instance, in the activity, "Sally played music with a piano", the instrument of the activity is the piano. The object that helped the agent perform the action. e.g. John wrote a book with *a pen*.
location location
A LinkValue referencing one or more physical or logical locations associated with the object. The location of the event, organization or action.
status actionStatus
An optional, explicit indicator of the current status of the activity. "active" indicates that the activity is ongoing, "canceled" indicates that the activity has been aborted, "completed" indicates that the activity has concluded, "pending" indicates that the activity is expected to begin, "tentative" indicates that the activity has been proposed, and "voided" indicates that the activity has been retracted or should be considered invalid. Indicates the current disposition of the Action. ActionStatusType ActiveActionStatus, CompletedActionStatus, PotentialActionStatus
startTime startTime
The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin. The startTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to start. For actions that span a period of time, when the action was performed. e.g. John wrote a book from *January* to December. Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.
endTime endTime
The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude. The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. e.g. John wrote a book from January to *December*. Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.

as:PotentialActionHandler || schema:EntryPoint

as:PotentialActionHandler schema:EntryPoint
application
An application that can complete the request.
method httpMethod
Identifies the HTTP Method used for a HttpRequest or BrowserView. An HTTP method that specifies the appropriate HTTP method for a request to an HTTP EntryPoint. Values are capitalized strings as used in HTTP.
url.template urlTemplate
Specifies the [RFC6570] URL Template used for UrlTemplate. An url template (RFC6570) that will be used to construct the target of the execution of the action.
mediaType contentType
When used on a Link, identifies the MIME media type of the referenced resource. When used on a Payload, identifies the MIME media type of the payload described. For instance, a Payload object with a mediaType of "application/json" would describe a JSON resource. When used on a EmbeddedView, identifies the MIME media type of value contained in the content property, if any. The supported content type(s) for an EntryPoint response.
encodingType
The supported encoding type(s) for an EntryPoint request.
expects
Describes zero or more required inputs for a PotentialActionHandler
requires
An Object or Link describing a required condition that must be satisfied before an application can carry out a PotentialAction using a specific PotentialActionHandler.
prefers
An Object or Link describing an optional condition that should be satisfied before an application can carry out a PotentialAction using a specific PotentialActionHandler.
potentialResult
Describes one or more potential results from using a PotentialActionHandler to carry out a PotentialAction.
handlerFor
Identifies the PotentialAction for which this PotentialActionHandler is associated.
browserContext
dentifies the target Web Browser Context name for a BrowserView.
sandbox
Describes the HTML sandbox policy for the BrowserView or EmbeddedView.

summary of differences

  • as:verb vs. schema:XYZAction (subtype)
    • as:Activity uses as:verb property to express type of action with values like as:watch
    • schema:Action uses rdf:type from RDF Schema (@type in JSON-LD) and for values subtypes of schema:Action, eg: schema:LikeAction or schema:PhotographAction
  • potential action (affordance) vs past activity
    • AS2.0 JSON-LD context defines as:status and as:CompletedStatus, as:ActiveStatus, as:CanceledStatus, as:PendingStatus, as:TentativeStatus while currently providing no examples of their use
    • Schema.org currently seems to focus on schema:potentialAction while also defining schema:actionStatus and schema:ActionStatusType enumeration schema:PotentialActionStatus schema:ActiveActionStatus schema:CompletedActionStatus. Many older examples of schema:Action express past activities #TODO link to relevant conversations on public-vocabs list

WORK IN PROGRESS, TBC