RDF Lite & FOAF (was Re: [rdfweb-dev] an 'anchor' 'rdf:nodeID' and an 'href' 'rdf:nodeID')

Christopher Schmidt crschmidt at crschmidt.net
Fri Apr 15 14:57:49 UTC 2005


On Fri, Apr 15, 2005 at 08:51:56PM +0700, Hendy Irawan wrote:
> > Like I said, using an RDF toolkit is the way to go: it takes care of
> > everything for you.
> Is there such thing as RDF lite? That doesn't contain all the
> abbreviations and (errr... complexities) of RDF/XML? I mean, the RDF
> graph model is (I guess) simple, why does RDF XML have to be that
> complicated... Ok, it's (fairly) easy to write RDF, but reading it
> (from the machine perspective, that is)..... is not so. And that...
> requires an "RDF toolkit".

You can write simple RDF, sure:

<rdf:Description rdf:nodeID="genid1">
    <ns0:name xmlns:ns0="http://xmlns.com/foaf/0.1/">Christopher
    Schmidt</ns:0>
</rdf:Description>
<rdf:Description rdf:nodeID="genid1">
    <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person" />
</rdf:Description>

but it's a lot simpler to just write:
<foaf:Person><foaf:name>Christopher Schmidt</foaf:name></foaf:Person>

RDF/XML lets you simplify a lot of the boring stuff, but as a result,
it's more complex to parse. If you want to deal with "Simple", you can
go to singletons, as described above, or you can even go to something
like ntriples:

_:genid1 <http://xmlns.com/foaf/0.1/name> "Christopher Schmidt" .
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://xmlns.com/foaf/0.1/Person> .

which tends to be even easier to parse.

What it comes down to is that all of this is taken care of for you in
one way or another in every major language in use today. If you've got
something that doesn't have an RDF toolkit language binding, you must be
using something pretty esoteric: PHP's got RAP, Python's got a half
dozen, starting at rdflib and ranging to pyrple, and you can use Redland
and its bindings in Python, Perl, C, C#, PHP, Ruby, and more.

XML parsing is easy, because the tools are almost always installed for
you. RDF parsing isn't much more difficult, because the libraries are
available to be installed.

> I've found an RDF toolkit for PHP though, at PEAR and also at
> powl.sourceforge.net ... so I guess it's not very much a problem. (and
> almost no one today mentions "XML toolkit", which is kinda' good
> thing, eh?)

They don't? Maybe I'm just using the wrong word, but if you've ever been
in a situation where you've wanted to use xmltools on a system without
libxml, you'll probably feel it. I know I have.

> > So, what're you trying to do? :)
> 
> My final project in college is building a kinda-like del.icio.us
> site... and trying to provide some kind of RDF data... (what's
> different with RSS? dunno)

RSS is an application which can be deployed atop RDF (with RSS 1.0 or
RSS 1.1), in the same way that FOAF is an application which can be
deployed atop RDF. 

> But my primary interest on RDF is about FOAF. I need to manage
> contacts/address book, and seemingly until now I haven't found a
> decent thing to do it. Outlook is too slow for even just 3000 contacts
> I have, and it's not that interoperable. My current "system" allows,
> for example, to publish a vCalendar file that can be used by Mozilla
> Sunbird or other vCalendar-based remote-calendar capable app (I guess
> not Outlook?) to display their birthdays in my schedule (however,
> Sunbird 0.2 is *dead slow* on displaying even just these amount of
> data, damn).

I basically manage my contacts with RDF + FOAF: I have an IRC interface
to my RDF store, and I use that to look up information I need, after
spidering it out of information that's stored in files mostly hosted by
LiveJournal.

> I want the contact management app to be able to express relationships
> between contacts and any arbitrary object (maybe another person, a
> book, a movie, whatever, I call them "topics"--from the Topic Maps
> model). I guess it's certain that I have to use a graph model, RDF or
> Topic Maps for this kind of data, but RDF is simpler...

RDF is a good way of doing this, yes.

> As bad as I haven't found a decent address book/contact management
> app, it'd be just worse that I haven't found any that can export to a
> FOAF file (well, since FOAF hasn't yet been a W3C Recommendation,
> heheh).

And FOAF probably never will be: RSS never went through a Rec stage
either, afaik. Seems to me (although I know nothing about W3C) that RECs
are for the technology: RDF, for example, is a W3C recommendation - and
that application level stuff doesn't fall into the same category.

> So, any ideas?

If you want to develop an application based on describing information in
RDF, and getting information out of it, I highly recommend grabbing an
RDF API of some kind and working with it. I personally use Redland, and
I swear by it, because it's fast, and awesome. You can store to SQLlite,
berkley db, MySQL. You can run SPARQL or RDQL queries, you can parse
just about anything on the planet (including RDF/XML, turtle, ntriples,
RSS-Tag-Soup, SVG metadata, and soon, GRDDL). All in all, it's a kickass
toolkit, and it's great to work with.

-- 
Christopher Schmidt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.usefulinc.com/pipermail/foaf-dev/attachments/20050415/b21639ec/attachment-0001.pgp


More information about the foaf-dev mailing list