> - Only add one entry for the collection object then have a link to get
> the
> contents of this collection object --> The problem with this approach
> is
> performance and having to make multiple requests. However it is quite
> extensible letting the hierarchy expand n levels.
I think having the top-level object of the activity be a photo album
doesn't quite fit the model used by existing applications, where "create
an album" and "add a photo to an album" are two distinct activities that
could in fact happen years apart.
> - Use Microsoft's $expand concept which allows the consumer to request
> the
> child feed inline. See
http://msdn.microsoft.com/en-us/library/dd541218.aspx
> --> This approach is semi compatible with the one
> above. MSFT also has the option of providing a count which we should
> consider. For example, a photo album has 100 pictures but we are only
> providing the thumbnails of 10 pics in the album.
>
Unfortunately this is a protocol-level feature rather than a
syntax-level feature, and we're currently exploring only syntax.
However, we should make a note of this for when we later inevitably
start working on standard protocols for efficiently exchanging activities.
>
> - Add multiple activity:object entries in atom:entry --> The problem
> with
> this approach is that while this would allow us to list each song in
> the
> playlist, there is no place for the attributes of the Playlist itself
> inside the atom:entry. It would have to go inside each
> activity:object
> with the atom:source. Note that the entry does also have source but
> this
> is reserved to convey the origin of the activity (via)
>
I think this approach is the best fit, with some adjustments.
First though I'd like to note that multiple activity:object elements in
an activity isn't defined to have any special meaning to an activity
processor, which is supposed to process it as a sequence of separate
activities. The multi-object syntax is there for the benefit of
non-activity feed readers.[1]
However, you're right that presently there isn't a good way to provide
the photo album as a pivot for an activity-aware aggregator to do
clustering.
Let's assume for the moment that the syntax spec includes
activity:target (the "indirect object") as an optional element in
activity entries. That then allows us to model my posting of several
photos into a photo gallery as follows:
<entry>
<title>Martin added three photos to an album</title>
<activity:verb>
http://activitystrea.ms/schema/1.0/post/
</activity:verb>
<activity:object>
<title>Coit Tower</title>
<activity:object-type>
http://activitystrea.ms/schema/photo/
</activity:object-type>
...
</activity:object>
<activity:object>
<title>Sealions</title>
<activity:object-type>
http://activitystrea.ms/schema/photo/
</activity:object-type>
...
</activity:object>
<activity:object>
<title>Windmill in Golden Gate Park</title>
<activity:object-type>
http://activitystrea.ms/schema/photo/
</activity:object-type>
...
</activity:object>
<activity:target>
<title>My trip to San Francisco</title>
<activity:object-type>
http://activitystrea.ms/schema/photo-album/
</activity:object-type>
...
</activity:target>
...
</entry>
This depends on a few things we don't have today:
* The activity:target element
* A photo-album object type
* A definition of how to interpret activity:target when used with the
"post" verb. (It is to be interpreted as the thing into which the object
was posted.)
This must still be manually clustered by a processor in the same way as
the previous atom:source approach, but the photo gallery appears only
once rather than in every entry, which is far less wasteful.
------------------------------------------
[1] Why is this distinction important? Consider the following three
activity sentences:
* Martin posted 5 photos on MySpace
* Martin posted 2 photos on Flickr
* Martin posted 1 photo on MySpace
An activity aggregator may choose to present this as a single activity
"Martin posted 8 photos", or it might choose to bundle the second
MySpace activity with the first and collapse down to two. In both cases,
the object bundling in the source feeds is ignored.
We should perhaps start a separat thread for this, but I was going to
propose modelling reviews as a funny sort of reply. In other words,
there'd be an object type called "review" and it would be marked as
being inReplyTo the object it's reviewing.
"MySpace Local" in that sentence seems to be in the same position as
"Flickr" in the sentence "Martin posted 5 photos on Flickr", so I think
what you have there is a "service provider" rather than a source.
However, I don't really know enough about MySpace Local to say what the
best representation of it is.
So in your example:
* The verb is "post"
* The object is the review
* The review is of type "review"
* The review has an in-reply-to element pointing at the object it's a
review of.
* We invent a simple schema for representing review scores and so forth,
probably based on the data model defined for hReview in the Microformats
community.
> We may even need to consider more than one target for the case when a
> user tags several people in a photo or note :)
That seems sensible, though it would need to be carefully defined.
> Ok but going back to the adding photos or songs example, if we add
> <activity:target> at the entry level, then <atom:source> at the
> <activity:object> level becomes obsolete. I think we would need to
> document very clearly when an object has a source
Indeed. In the case where the verb is "post" it is implied that the
object(s) in the entry are now contained within the object provided as a
target.
You could in theory still include atom:source to indicate the *primary*
place where something lives, but it's not necessary. It will still be
useful for situations where items are borrowed from one feed and
republished in another.
Can you post an example of this? I'm not sure I understand what you're
proposing here.
Hmm.
I'm not sure about this, since object-role seems to be re-inventing the
concept of element names... if something has a different meaning then it
ought to have a different element name. The fact that object and target
have the same content model doesn't necessarily mean that it must have
the same element name. For example, in HTML we don't have <inline-style
type="bold"> and <inline-style type="italic">.
(Though regrettably, as a side-note, the XML format for RFCs that we're
using for the specs does have <spanx type="emphasis">, which is
incredibly tedious to set, which is why I'm often lazy about it.)