sioc:last_reply_date and last activity on a page

1 view
Skip to first unread message

Stephane Corlosquet

unread,
Dec 4, 2009, 12:35:42 PM12/4/09
to sioc...@googlegroups.com, Lin Clark, Sam Brin
Hi,

While discussing the patch [1] for the tracker page of Drupal 7 with some colleagues, we realized that we need to have a property for describing the last activity date of a page. To understand the example below, please refer to http://drupalrdf.openspring.net/tracker for a typical tracker page.

We need to cover the following cases:
1- a brand new page was created, the "last activity" date is the date of the creation of the page. example: "Static page (just created, never updated)".
2- a page with no comment was updated, the "last activity" date is the date at which the page was modified last. example: "About us (udpated multiple times but no comment)".
3- a page has one or more comments, the "last activity" date is either the date of the last comment or the last date at which the page was last updated. example "hN8LjR5aLQ2N" or any other page with comments.

We realized SIOC does not have any property that cover all these cases at once. I think it does make sense to have a property sioc:last_reply_date for the case (3), though if the page was updated after the last comment was posted it is semantically incorrect. The other cases 1 and 2 should not use the sioc:last_reply_date because it would assume there are one or more replies in that page which would be wrong. There is also the sioc:last_item_date property but it has a restriction on the domain which is sioc:Container which is a problem since our pages are either of type sioc:Item or sioc:Post. For simplicity we do not use the concept of sioc:Container or sioc:Thread anywhere, and we assume a page (i.e. a node in Drupal jargon) is somewhat similar to a thread when there are comments on it, it avoids us to have to create a new resource for the sioc:Thread. Would you consider creating a property sioc:last_activity_date with no domain/range restriction which would cover all the 3 cases above? Alternatively we could use dcterms:modified but I'd rather use something more specific from the sioc realm.

Here is a proposal:

sioc:last_activity_date - The date and time of the last update or the last reply Post or Comment, which could be associated with a starter Item or Post or with a Thread, and expressed in ISO 8601 format.
OWL Type:      DatatypeProperty
sub-property-of:     dcterms:date
Range:     rdfs:Literal

sioc:last_reply_date would be a sub-property-of sioc:last_activity_date

regards,
Stephane.

[1] http://drupal.org/node/614508

Nathan

unread,
Dec 4, 2009, 2:13:35 PM12/4/09
to sioc...@googlegroups.com, Lin Clark, Sam Brin
> --
>
> You received this message because you are subscribed to the Google Groups "SIOC-Dev" group.
> To post to this group, send email to sioc...@googlegroups.com.
> To unsubscribe from this group, send email to sioc-dev+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sioc-dev?hl=en.
>
>
>

your page is a sioc:Container, and the comments are a Thread which is a
child of the Container; I read what you said, but it is a Container, and
if you specify it as such you won't need any of these things. as the
sioc:last_reply_date is the last_item_date of the Thread and the
last_activity_date is the last_item_date of the page container.

you're probably going to hate me for this, but imho drupal 7 RDFa is one
of the most important things to get right for the coming phase of the
web, 90% of the cms/blogo-sphere will be looking to the way drupal does
things and going from their with there own implementations. Please, i
beg you, don't cut corners "for simplicity", just do it perfectly in
every way, even if it takes twice as long - you've got a real chance to
set the trend and be the role model for most of the net with this
implementation.

I really mean no disrespect, and admire what you're doing, best
intentions as they say.

regards,

John Breslin

unread,
Dec 8, 2009, 5:18:39 AM12/8/09
to SIOC-Dev
Hi Stephane,

What about:

1- a brand new page was created, the "last activity" date is the date
of the
creation of the page. example: "Static page (just created, never
updated)".

dc:created

2- a page with no comment was updated, the "last activity" date is the
date
at which the page was modified last. example: "About us (udpated
multiple
times but no comment)".

dc:modified

3- a page has one or more comments, the "last activity" date is either
the
date of the last comment or the last date at which the page was last
updated. example "hN8LjR5aLQ2N" or any other page with comments.

dc:modified and sioc:last_reply_date

?

John.

Alexandre Passant

unread,
Dec 8, 2009, 6:07:15 AM12/8/09
to sioc...@googlegroups.com
Hi,

I would be in favor of simply using DC properties, modified and created as mention below.
In case 3, it will imply that adding a comment to a page = modifying the page, which is ok to me.

Adding a last_reply_date seems redundant, as it can be retrieved by using the other properties in the page (e.g. in SPARQL).

However, that issue brings a more general concern of adding properties dedicated to RDFa publishing (cf Peter Mika's statement, esp. section 3 [1]).
To that extent, as I don't think there are any best practices so far, it may be worth to distinguish core properties and the ones dedicated to "RDFa annotations", either by splitting in modules or typing them differently, e.g. ex:RDFaProperty (in addition on rdfs:Property) to say that such property is suited for RDFa annotations to ease the processing part but should not be used directly in pure RDF documents.

Any thoughts ?

Best,

Alex.

[1] http://www.w3.org/2008/09/msnws/papers/pmika-position-paper.pdf
> --
>
> You received this message because you are subscribed to the Google Groups "SIOC-Dev" group.
> To post to this group, send email to sioc...@googlegroups.com.
> To unsubscribe from this group, send email to sioc-dev+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sioc-dev?hl=en.
>
>

--
Dr. Alexandre Passant
Digital Enterprise Research Institute
National University of Ireland, Galway
:me owl:sameAs <http://apassant.net/alex> .






Stephane Corlosquet

unread,
Dec 8, 2009, 10:35:06 AM12/8/09
to sioc...@googlegroups.com, john.b...@nuigalway.ie, Alexandre Passant
Hi John, Alex,

I was hoping to find a generic property that covers all 3 cases at once. The reason is that when rendering the tracker page, all the data is denormalized for performance reasons, which means that we do not know which of the case the date corresponds to - that would involve loading each single page and all its comments in memory which would kill performance on the site.

So, what property could encompass dc:created, dc:modified and sioc:last_reply_date? dc:date is a possibility but it is also too generic I tihnk. That's why I thought of a property named sioc:last_activity_date which would match perfectly here because it covers both last_reply_date and last modification of the original post (dc:modified). Does that make sense?

Steph.

Stephane Corlosquet

unread,
Dec 8, 2009, 10:51:01 AM12/8/09
to sioc...@googlegroups.com
Hi Nathan,

Thanks for your feedback.


your page is a sioc:Container, and the comments are a Thread which is a
child of the Container; I read what you said, but it is a Container, and
if you specify it as such you won't need any of these things. as the
sioc:last_reply_date is the last_item_date of the Thread and the
last_activity_date is the last_item_date of the page container.

sioc:Thread is a subclass of sioc:Container so either would work (I would probably use Thread here). I'm not sure I would necessarily separate the replies from the initial post, but rather put them all in a Thread. However I'm trying to minimize the amount of classes used in order to keep the RDFa markup as simple as possible. For example, I'm not explicitly using Container nor Thread since everything is linked via sioc:has_reply, see the snippet from the sioc specs:
"The Thread container is used to group Posts from a single discussion thread together via the sioc:container_of property, especially where a sioc:has_reply / reply_of structure is absent. "



you're probably going to hate me for this, but imho drupal 7 RDFa is one
of the most important things to get right for the coming phase of the
web, 90% of the cms/blogo-sphere will be looking to the way drupal does
things and going from their with there own implementations.

Every system is different, and while one could take the Drupal implementation as a base model, I would not want them to copy exactly the model we use without questioning it and adapting it to the structure of their system.

Steph.

Jodi Schneider

unread,
Dec 8, 2009, 11:10:16 AM12/8/09
to sioc...@googlegroups.com
Hi Stephane (et al),

Perhaps this is naive, but it sounds like you're recording one
modified date. Would it be possible, in your use case, to instead
record two dates, the modified date (main content) as well as the
comment activity date (comment)? Then the last activity date could be
computed as the later of these two.

Pardon if I'm misunderstanding how Drupal nodes work. I'd like to see
DC properties reused here, if it's at all possible.

-Jodi

Stephane Corlosquet

unread,
Dec 8, 2009, 11:48:22 AM12/8/09
to sioc...@googlegroups.com
Hi Jodi,

You're the third one to suggest dc! Let's me thrown in some RDF and see if it makes sense:

case 1:
<http://drupalrdf.openspring.net/node/151>
    dc:title "Static page (just created, never updated)"@en ;
    sioc:has_creator <http://drupalrdf.openspring.net/user/1> ;
    dc:modified "2009-11-27T17:39:25-06:00"^^xsd:dateTime ;
    sioc:num_replies 0 .

case 2:
<http://drupalrdf.openspring.net/node/150>
    dc:title "About us (udpated multiple times but no comment)"@en ;
    sioc:has_creator <http://drupalrdf.openspring.net/user/1> ;
    dc:modified "2009-11-27T17:39:25-06:00"^^xsd:dateTime ;
    sioc:num_replies 0 .

case 3:
<http://drupalrdf.openspring.net/node/146>
    dc:title "hN8LjR5aLQ2N"@en ;
    sioc:has_creator <http://drupalrdf.openspring.net/user/20> ;
    dc:modified "2009-11-27T17:39:25-06:00"^^xsd:dateTime ;
    sioc:last_reply_date "2009-11-27T17:39:25-06:00"^^xsd:dateTime ;
    sioc:num_replies 22 .


Would case 1 with dc:modified be ok even if the post was never modified and just created, i.e. dc:created = dc:modified? The reason for this preference is that during the rendering of the tracker page, we don't know whether the date is the date of creation or modification of the post.


Alex said:

In case 3, it will imply that adding a comment to a page = modifying the page, which is ok to me.
 
is it still ok given that <http://drupalrdf.openspring.net/node/146> is of rdf:type sioc:Post? If it was a sioc:Thread it would be ideal but hopefully it still works with sioc:Post.

In the case 3 we could add the sioc:last_reply_date easily since we know whether the number of comments is > 0, but Alex seems to think it's not necessary?

The above RDF would be easy to integrate in the Drupal tracker page, so let me know if you like it.

Steph.

Breslin, John

unread,
Dec 9, 2009, 6:04:04 AM12/9/09
to sioc...@googlegroups.com

Hi Steph –

 

Might brainstorm this on Skype rather than sending short messages to you!

 

John.

Reply all
Reply to author
Forward
0 new messages