Guys who are talking about the Web 3.0 are talking about web semantic. But what is this so hoped upcoming web. Just another hype buzzword of course.
The idea of Web Semantic is to have a knowledge network you can browse, a big picture you can navigate in and discovering resources. This big picture, a graph, is achieved by added data to data, also knows as metadata. The standard way to describe resources is to use RDF. RDF isn’t a syntax. And one way to discover informations is SPARQL, a SQL-like for RDF. Let’s start with a example you can run on the Opera’s Community SPARQL querying tool:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name ?weblog WHERE {
?hakon foaf:name "Håkon Wium Lie" .
?user foaf:knows ?hakon .
?user foaf:name ?name .
?user foaf:weblog ?weblog .
}
This query can be translated to : For every user who knows a guy named “Håkon Wium Lie” give me their name and weblog URL. Let’s decrypt it line after line.
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
Define the foaf namespace, after this foaf:name is the same as
http://xmlns.com/foaf/0.1/name.
SELECT ?name ?weblog WHERE {
Select the variables called name and weblog.
?hakon foaf:name "Håkon Wium Lie" .
Define the variable hakon to be the user(s) who his name is “Håkon Wium Lie”.
?user foaf:knows ?hakon .
Define the variable user to be the user(s) who knows (foaf:knows) hakon.
?user foaf:name ?name .
Define the variable name to be the foaf:name of the user
?user foaf:weblog ?weblog .
Define the variable weblog to be the foaf:weblog of the user.
}
End of the WHERE statement.
Is there some prolog users, quite similar no?
Now go back to a web application, based on a kitchen-sink-included web framework. There is a powerful tool called ActiveRDF (if you know ActiveRecord, you’ll understand) that enable you to use a Triple Store backend (Redland, SQLite, SPARQL, ...) for your web app. I need to experiment it much more to explain it to you soon.
Watch this presentation to dive a little more into this.