Ty wrote:
> I am newly joining this thread at Chris Messina's request, so
> apologies up front if I somehow violate protocol. I have read all of
> the background that I can find.
>
> I wanted to document an additional use-case that involves two actors:
> two sports teams. My site (fanfeedr) offers up real-time streams of
> sports news and information, and we have activity streams that look
> like this:
>
> "37-28 | Patriots 37, Wildcats 28 at the end of the first half. 13
> minutes ago."
>
> The score is the title, I believe, and then the Patriots and the
> Wildcats are two actors. The timestamp "13 minutes ago" is our UX
> artifact.
>
> This is the result when a game is over (the previous example was in
> the middle of the game.)
>
> "109-95 | Celtics beat Warriors. 17 hours ago. Comment"
>
> Presumably this can't be handled if there is a sole actor, so I wanted
> to surface it now.
>
> Please let me know if there is additional information needed to make
> this actionable.
>
This is an interesting example. Thanks for sharing it. Allow me to
brainstorm about it a bit...
What would you consider the verb to be in the above examples? and the
object?
It seems like the score is the closest thing to an "object" here. So I
guess given that assumption you could say that the verb is "to score"
and, as you say, the two teams are together the actor.
In situations like this where we find outselves modelling real-world
activities our solution thus far has been to instead model the online
activity that describes the real-world activity. For example, rather
than modelling "Martin went to an event" we model "Martin RSVPed Yes to
an event" (which consumers are free to present as "Martin is going to an
event" if they wish.)
So here's my attempt to apply this principle here:
What's happening is that a game update is being posted.
The update is being posted either by a person who is posting it or a
placeholder object that represents Fanfeedr itself.
The update is the object.
So if we were to render that as a sentence (on another site) we might
get something like:
"Fanfeedr reports that the score was Patriots 37, Wildcats 28 as of the
end of the first half."
Here I've also applied a second design principle I try to keep to so
that our fallback behavior works as well as possible: I invented an
object type to avoid inventing a verb.
If we assume that the serialization of your "game update" object type
includes the score in the title and an atom:source element whose title
is "Patriots vs. Wildcats score updates" then the fallback behavior for
a client that doesn't support this special object type would be:
Fanfeedr posted "Patriots 37, Wildcats 28 at the end of the first
half" on Patriots vs. Wildcats score updates
Which is, as is often the case with these fallbacks, not ideal but still
understandable.
So what might this look like as a feed? Here's a strawman, with parts
omitted for brevity:
<feed xmlns="..." xmlns:activity="..." xmlns:fanfeedr="...">
<title>Patriots vs. Wildcats score updates</title>
<author>
<name>Fanfeedr</name>
</author>
....
<entry>
<id>...</id>
<activity:object-type>
tag:
fanfeedr.com,2009:some-identifier
</activity:object-type>
<title>
Patriots 37, Wildcats 28 at the end of the first half
</title>
<fanfeedr:score team="Patriots" score="37" />
<fanfeedr:score team="Wildcats" score="28" />
<!--
+ some machine-readable representation of
"at the end of the first half"
-->
....
</entry>
</feed>
So I just completely made up an XML namespace for expressing sports
scores. I'm not suggesting that this would actually be what it would
look like, but rather hoping to illustrate that you'd probably want to
break out the actual data into its own fields so that consumers that
know about this object type can do something more clever with it, while
generic clients can just render the title.
I used the "implied activity" shorthand to imply the "post" verb here,
since the above is enough to describe what's going on in a way that
works for generic Atom consumers, generic Activity Streams consumers
with no support for sports updates, and for Activity Streams consumers
with special support for sports updates.
I've also put this in a fanfeedr.com-specific namespace to avoid
confusion, but in theory this object type could be codified in a spec
and used by other sport notification sites if such things exist. (You'll
have to excuse this complete non-sports-follower's ignorance of what's
out there in this space. :) )