Slides semantic web and Drupal 7 NYCCamp 2012
-
Upload
scorlosquet -
Category
Education
-
view
112 -
download
0
description
Transcript of Slides semantic web and Drupal 7 NYCCamp 2012
![Page 1: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/1.jpg)
The Semantic Web and Drupal 7
Stéphane CorlosquetNYCCampJuly 21st, 2012
![Page 2: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/2.jpg)
About the speaker
● Stéphane “scor” Corlosquet● 6 years with Drupal● Drupal 7 RDF core maintainer● Drupal Security Team member● Co-authored the
Definitive Guide to Drupal 7● Co-maintain RDF Extensions,
SPARQL, schema.org● Member of the RDFa WG
![Page 3: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/3.jpg)
Rich Snippets
![Page 7: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/7.jpg)
Why Structured Data in HTML
● Help machines extract relevant data from HTML
● Can make use of this data in amazing ways (e.g. enhanced search results)
![Page 8: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/8.jpg)
Structured Data in HTML
● Add or alter HTML attributes
● Syntaxes– Microformats (@class, @rel)
– RDFa 1.0 (@property, @about, @typeof, …)
– Microdata (@itemscope, @itemtype, @itemprop, …)
– RDFa 1.1 & RDFa Lite
![Page 9: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/9.jpg)
Structured Data in HTML
● Evolution and cross-syntax influence
![Page 10: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/10.jpg)
Schema.org
![Page 11: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/11.jpg)
Schema.org
● Describe the type of your content (Person, Event, Recipe, Product, Book, Movie, etc.)
– 293 types and counting
● Each type has a set of properties– Common properties: name, description, image, url
– Specific properties depending on the type (see type page on schema.org)
– 286 properties and counting
![Page 13: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/13.jpg)
Schema.org
![Page 14: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/14.jpg)
Schema.org module for Drupal
● UI instead of code
● Map your content types and fields to the schema.org terms
http://drupal.org/project/schemaorg
![Page 15: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/15.jpg)
Example: Event
![Page 16: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/16.jpg)
Rich Snippet testing tool
● http://www.google.com/webmasters/tools/richsnippets
![Page 17: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/17.jpg)
Examples
● Events– “force11 events”: http://goo.gl/VVhNM
– DrupalCon Munich: http://goo.gl/jgMvw
– University of Waterloo: http://goo.gl/Df9hp
● Person– DGD7 – Jacine Luisi: http://t.co/rTK8N9K2
– Stéphane Corlosquet: http://goo.gl/9dWdL
![Page 18: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/18.jpg)
Schema.org module
● http://drupal.org/project/schemaorg– Download module (beta)
– Documentation on drupal.org
– Screencast + examples
![Page 19: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/19.jpg)
Schema.org module
Play time!
http://www.google.com/webmasters/tools/richsnippets
http://bit.ly/schema-event
![Page 20: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/20.jpg)
Beyond SEO
![Page 21: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/21.jpg)
History of RDF in Drupal
● rdf.php (2000, Dries)● FOAF, vCard (2004, walkah)
● Relationship (2005, dman)● Semantic Search (2006, hendler)
● RDF (2007, Arto)● OpenCalais (febbraro, 2008)
● RDF CCK (2008, scor)
![Page 22: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/22.jpg)
Drupal 7 and RDF
● Drupal 7 core is RDFa enabled● RDFa output by default on blogs, forums,
comments, etc. using FOAF, SIOC, DC, SKOS
● Extensible via RDF mapping API, e.g. schema.org
![Page 23: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/23.jpg)
http://en.wikipedia.org/wiki/File:Oriente_Station_Lisboa_roof.jpg
Architecture
● User driven data model● Content type => RDF class
● Field => RDF property● Node => RDF resource
![Page 24: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/24.jpg)
Content types and Fields
![Page 25: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/25.jpg)
Content types and Fields
![Page 26: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/26.jpg)
Node
![Page 27: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/27.jpg)
Drupal 7 and RDF
![Page 28: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/28.jpg)
Drupal 7 and RDF
● Contributed module for more features● RDF Extensions
● Serialization formats: RDF/XML, Turtle, N-Triples
● SPARQL● Expose Drupal RDF data in a SPARQL Endpoint
● SPARQL Views● Display remote RDF data in Drupal using SPARQL
● JSON-LD● Expose Drupal RDF data as JSON-LD (CORS-enabled)
● Features and packaging● Build distributions / deployment workflow
![Page 30: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/30.jpg)
SPARQL Endpoint
● Public endpoint available at /sparql
● http://prefix.cc/sioc,rnews.sparql
![Page 31: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/31.jpg)
RDFa 1.1
● Published as W3C Rec last month
● RDFa Lite● RDFa 1.1 Full● Leaner markup
● http://rdfa.info/play/
![Page 32: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/32.jpg)
RDFa 1.1
● Works with HTML5
● No dependency on XHTML● HTML5 doctype● Popular themes are being updated
![Page 33: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/33.jpg)
Demos
rNews by International Press Telecommunications Council (IPTC)
– Open Publish
PREFIX rnews: <http://iptc.org/std/rNews/2011-10-07#>
SELECT * WHERE { ?s a rnews:Article; rnews:name ?title.}
![Page 34: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/34.jpg)
JSON-LD in Drupal
● Client side as well as server side friendly
● Browser Scripting:– Native javascript format
– RDFa API in the DOM
● Data can be fetched from anywhere:– Cross-Origin Resource Sharing (CORS) enabled
● Client can mash data
● http://drupal.org/project/jsonld
![Page 35: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/35.jpg)
Demos
● Occupy Directory– http://directory.occupy.net/occupations
– JSON-LD: http://directory.occupy.net/node/19652.jsonld
● Federated General Assembly– Drupal distribution for occupy movement
– http://wiki.occupy.net/wiki/Federated_General_Assembly
![Page 36: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/36.jpg)
Domeo + Drupal
● Data mash up from independent, but related sources
![Page 37: Slides semantic web and Drupal 7 NYCCamp 2012](https://reader034.fdocuments.net/reader034/viewer/2022051412/54c649a74a7959df5f8b4574/html5/thumbnails/37.jpg)
Domeo + Drupal
● Data mash up from independent, but related sources