Real world example

So far, the DC (on here) has not really been used to any great extent other than to show the idea. There is though a far better example on the Dublin Core website and for what it is, is good, I need something different

Social networks

Social networks have come on in the last couple of years, but they all suffer from the same problem - you have to enter the same data time and again in a pile of places. Look at Facebook as a prime example. Information is entered in at least three different places, much of which is duplicate data. This serves only to annoy the end user. As I've previously said, this could be down to the designers thinking computer and not human and so a re-think is required

The design

Design is always crucial - the better the design at the start, the better the end product. This is my list of what data I will need to collect for my social network example

  • Name (given & family)
  • email
  • Date of Birth (don't need the age, I can work that out)
  • Occupation
  • Date of sign up (hidden to the user)
  • Country of sign up (can be done using Geo Tags, the user sees the end result)
  • Likes, dislikes, hobbies, interests

The list could go on and on for as many different parameters as I like, but I will keep it simple here.

As previously stated, the name has to be a nonliteral and call in FOAF (as does email). The likes/dislikes etc are actually four different fields which can be completely optional (minOccurs is set to 0 here). These can be literal or non-literal depending on the end user needs. non-literal would mean that it would have to be from a pre-defined list of common likes/dislikes - this is fine in some instances, but if the user has none of the elements on the list, then the parameter serves no purpose. To get around this, both a literal and non-literal field can be applied

First attempt - name & email

Setting up the name looks like this

<StatementTemplate ID="author" minOccurs="1" maxOccurs="1" type="nonliteral">
<Property>http://purl.org/dc/terms/creator</Property>
<NonLiteralConstraint descriptionTemplateRef="person"/>
</StatementTemplate>

<DescriptionTemplate ID="person" minOccurs="0"  standalone="no">
<StatementTemplate ID="givenName" minOccurs="1" maxOccurs="1" type="literal">
<Property>http://xmlns.com/foaf/0.1/givenname</Property>
</StatementTemplate>
<StatementTemplate ID="familyName" minOccurs="1" maxOccurs="1" type="literal">
<Property>http://xmlns.com/foaf/0.1/family_name</Property>
</StatementTemplate>
<StatementTemplate ID="email" minOccurs="1"  type="nonliteral">
<Property>http://xmlns.com/foaf/0.1/mbox</Property>
<NonLiteralConstraint>
<ValueURIOccurrence>mandatory</ValueURIOccurrence>
</NonLiteralConstraint>
</StatementTemplate>
</DescriptionTemplate>

Date of birth

Here I'll use the w3c format. I don't need to ask the end user their actual age, a bit of really simple math and that is sorted. Why should the user be asked for two pieces of information when really just because of laziness means more work and as duller user experience?

Don't believe me how simple it is to work out?

sub CalcAge(Birthday As String)
Dim YearDay As Date
If Val(Format(Birthday, "y")) > Val(Format(Date, "y")) Then
YearDay = DateAdd("yyyy", 1, (Birthday))
Else
YearDay = Birthday
End If
CalcAge = DateDiff("yyyy", YearDay, Date)
End sub

The problem with birthday is that there are a number different ways this can be done (FOAF defines a couple of different methods, including birthday) with BIO defining event. birthday unfortunately only accepts MM-DD so is pretty useless. event though uses the w3c date format. Again, to access it via the DC system, a template has to be used. This can be simply incorportated into the name schema

<DescriptionTemplate ID="person" minOccurs="0"  standalone="no">
<StatementTemplate ID="givenName" minOccurs="1" maxOccurs="1" type="literal">
<Property>http://xmlns.com/foaf/0.1/givenname</Property>
</StatementTemplate>
<StatementTemplate ID="familyName" minOccurs="1" maxOccurs="1" type="literal">
<Property>http://xmlns.com/foaf/0.1/family_name</Property>
</StatementTemplate>
<StatementTemplate ID="email" minOccurs="1"  type="nonliteral">
<Property>http://xmlns.com/foaf/0.1/mbox</Property>
<NonLiteralConstraint>
<ValueURIOccurrence>mandatory</ValueURIOccurrence>
</NonLiteralConstraint>

<StatementTemplate ID="dob" minOccurs="1" maxOccurs="1" type="literal">
<Property>http://purl.org/vocab/bio/0.1/Birth</Property>
</StatementTemplate>

</DescriptionTemplate>
 | Page 2