building linked data apps
DESCRIPTION
Presentation about how to use linked data in your iPhone appTRANSCRIPT
Building Linked Data Apps for the
iPhone
11/12 juni HTML Hackathon
Henk Jurriens
www.ihenk.com
www.twitter.com/henkjurriens
Linked Data
Developing for iPhone
Lodsy
Linked Open DataLinked Open Data
Data sets•DBPedia
•GeoName
• FOAF
8-10-2007
28-2-2008
5-3-2009
14-7-2009
"a term used to describe a recommended best practice for exposing, sharing, and
connecting pieces of data, information, and knowledge on the Semantic Web"
Linked Data Principles
1.Use URI as names for things
2.Use HTTP URIs so that people can look up those names
3.When someone looks up a URI, provide useful information, using the standards (RDF, SPARQL)
4.Include links to other URIs, so that they can discover more things
Include links to other URIs, so that they can discover more things
Technology stack
URIURIURIURI HTTPHTTPHTTPHTTP
RDF, RDF/XML, RDF SchemaRDF, RDF/XML, RDF SchemaRDF, RDF/XML, RDF SchemaRDF, RDF/XML, RDF Schema
RDFaRDFaRDFaRDFa GRDDLGRDDLGRDDLGRDDL SPARQLSPARQLSPARQLSPARQL
Resource Description Framework
restaurantrestaurantrestaurantrestaurant ““OstermalmshallenOstermalmshallen””
““OstermalmshallenOstermalmshallen””
title
subjectsubjectsubjectsubject valuevaluevaluevalue
property
subject has a property with “value” (s,p,v)
id title description type
1Ostermalmshall
enA very nice...
market
... ... ... ...
““OstermalmshallenOstermalmshallen””
““OstermalmshallenOstermalmshallen””
title
““A very nice ...”A very nice ...”““A very nice ...”A very nice ...”
marketmarketmarketmarket
description
restaurantrestaurantrestaurantrestaurant
type
““OstermalmshallenOstermalmshallen””
““OstermalmshallenOstermalmshallen””
title
““A very nice ...”A very nice ...”““A very nice ...”A very nice ...”
marketmarketmarketmarket
description
type
restaurantrestaurantrestaurantrestaurant
owner
JurriensJurriensJurriensJurriens
personpersonpersonpersonname
RDF names things with URIs
<<http://www.ostermalmshallen.se
>>
<<http://www.ostermalmshallen.se
>>““OstermalmshallenOstermalmshallen
””““OstermalmshallenOstermalmshallen
””
<http://purl.org/dc/elements/1.1/title>
•Dublin Core
• FOAF
•Geo
• http://www.schemaweb.info
Writing down graphs
<http://www.ostermalmshallen.se> <http://purl.org/dc/elements/1.1/title
> "Ostermalm Food Hall" .
SPARQL
•Prefix declarations
•Dataset definition
•Result clause
•Query pattern
•Queri modifiers
# prefix declarations
PREFIX foo: <http://example.com/resources/>
...
# dataset definition
FROM ...
# result clause
SELECT ...
# query pattern
WHERE {
...
}
# query modifiers
ORDER BY ...
SPARQL endpoints
•Generic
•Specific
Result of SPARQL queries
•XML
•JSON
•RDF (RDF/XML, N3)
@prefix foaf: <http://xmlsn.com/foaf/0.1/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix geo: <http://www.w3.org/2003/01/geo/> .
<http://www.ostermalmshallen.se> <dc:title> "Ostermalm Food Hall" .
<http://www.ostermalmshallen.se> <foaf:img> <http://flickr.com/7a_b.jpg> .
<http://www.ostermalmshallen.se> <geo:wgs84_pos#lat> "59.332788" .
<http://www.ostermalmshallen.se> <geo:wgs84_pos#long> "18.064488" .
PREFIX dc: <http://purl.org/dc/elements/1.1/>.
SELECT ?title
WHERE {
?restaurant dc:title ?title .
}
Good news
more
Developing for iPhone
Technologies
Objective C
HTMLiPhone SDK
REST
HTML 5
CSS3
Google Maps API
• iProcessing.js
• jQTouch
Libraries
Lodsy
ConceptsFacets
LodsyLodsy LODLOD
Triple Triple storestoreTriple Triple storestore
Architecture
SPARQL
Facets
Views
SPARQL
q= <http://www.ihenk.com/henkjurriens> ?p ?v
q = ?s <http://purl.org/dc/elements/1.1/title> ?v
q = ?s <http://purl.org/dc/elements/1.1/title> ?v |
?s <http://xmlns.com/foaf/0.1/img> ?v
Facets
Facet
Name Property Type
Title<http://purl.org/dc/elements/
1.1/title> String
Email<http://xmlns.com/foaf/0.1/
mbox> Email
... ... ...
Views
rdfView
mapView
mapDetail
Demo
Future work
One more thing
Questions?