Se ha denunciado esta presentación.
Se está descargando tu SlideShare. ×
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Próximo SlideShare
Future Challenges for TYPO3
Future Challenges for TYPO3
Cargando en…3
×

Eche un vistazo a continuación

1 de 60 Anuncio
Anuncio

Más Contenido Relacionado

A los espectadores también les gustó (20)

Más reciente (20)

Anuncio

Semantic TYPO3

  1. 1. Semantic TYPO3 Develop Extensions with Semantic Web in Mind Jochen Rau @ T3CON11SF June 11, 2011
  2. 2. (c) by Benjamin Nowack, Attribution 3.0 Unported (CC BY 3.0)
  3. 3. Concepts (c) by Benjamin Nowack, Attribution 3.0 Unported (CC BY 3.0)
  4. 4. Implementations (c) by Benjamin Nowack, Attribution 3.0 Unported (CC BY 3.0)
  5. 5. http://commons.wikimedia.org/wiki/File:Z%C3%BCrich_-_Seefeld_-_Heureka_IMG_1757.JPG
  6. 6. No Rocket Science
  7. 7. Let's make some assertions about me Jochen's is a Person. Jochen's age is 40. Jochen's name is Jochen Rau. Jochen likes TYPO3 and Wine. Jochen lives in Massachusetts.
  8. 8. Let's make some assertions about me Jochen's is a Person. Jochen's age is 40. Jochen's name is Jochen Rau. Jochen likes TYPO3 and Wine. Jochen lives in Massachusetts. Subject Predicate Object
  9. 9. Let's make some assertions about me Jochen's is a Person. Jochen's age is 40. Jochen's name is Jochen Rau. Jochen likes TYPO3 and Wine. Jochen lives in Massachusetts. Subject Predicate Object Triple
  10. 10. Let's make some assertions about me Jochen 40 age name Jochen Rau is a likes TYPO3 likes lives in Jochen's is a Person. Person Jochen's age is 40. Wine Massachusetts Jochen's name is Jochen Rau. Jochen likes TYPO3 and Wine. Jochen lives in Massachusetts.
  11. 11. Let's make some assertions about me Jochen 40 age name Jochen Rau is a likes TYPO3 likes lives in Jochen's is a Person. Person Jochen's age is 40. Wine Massachusetts Jochen's name is Jochen Rau. Jochen likes TYPO3 and Wine. TYPO3 Jochen lives in Massachusetts. license GNU General Public License description platform TYPO3 is a free and open source content management system as well as a Model–view– controller (MVC) Web PHP Application Development framework written in PHP.
  12. 12. Let's make some assertions about me Jochen 40 age name Jochen Rau is a likes TYPO3 likes GNU General license lives in Public License Jochen's is a Person. Person description Jochen's age is 40. Wine Massachusetts Jochen's name is Jochen Rau. platform TYPO3 is a free and open source content Jochen likes TYPO3 and Wine. management system as Jochen lives in Massachusetts. well as a Model–view– controller (MVC) Web PHP Application Development framework written in PHP.
  13. 13. Unique Names for Resources Jochen knows Sebastian likes Paris
  14. 14. Unique Names for Resources <http://typoplanet.de/resource/Jochen> <http://xmlns.com/foaf/0.1/knows> <http://sebastian.kurfuerst.eu/> <http://xmlns.com/foaf/0.1/likes> <http://en.wikipedia.org/wiki/Paris_(2008_film)> <http://typoplanet.de/resource/Jochen> <http://typoplanet.de/resource/hg132k4jhjh1234t> <urn:uuid:67ecc3bd-07e2-44f4-a788-597bf9949f0c> <tel:+1-617-555-7332> <mailto:jochen.rau@typoplanet.de>
  15. 15. Unique Names for Resources <http://typoplanet.de/resource/Jochen> <http://xmlns.com/foaf/0.1/knows> <http://sebastian.kurfuerst.eu/> <http://sebastian.kurfuerst.eu/> <http://xmlns.com/foaf/0.1/likes> <http://en.wikipedia.org/wiki/Paris_(2008_film)>
  16. 16. Turtle Serialization of an RDF Graph <http://example.com/JR> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . <http://example.com/JR> <http://xmlns.com/foaf/0.1/age> "40" . <http://example.com/JR> <http://xmlns.com/foaf/0.1/name> "Jochen Rau" . <http://example.com/JR> <http://xmlns.com/foaf/0.1/interest> <http://dbpedia.org/resource/TYPO3> . <http://example.com/JR> <http://xmlns.com/foaf/0.1/interest> <http://dbpedia.org/resource/Wine> . <http://example.com/JR> <http://example.com/livesIn> <http://data.nytimes.com/Massachusetts> .
  17. 17. Turtle Serialization of an RDF Graph @prefix ex: <http://example.org/> . @prefix dbp: <http://dbpedia.org/resource/> . @prefix nyt: <http://data.nytimes.com/> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . ex:JR a foaf:Person . ex:JR foaf:age "40" . ex:JR foaf:name "Jochen Rau" . ex:JR foaf:interest dbp:TYPO3 . ex:JR foaf:interest dbp:Wine . ex:JR ex:livesIn nyt:Massachusetts .
  18. 18. Turtle Syntactic sugar @prefix ex: <http://example.org/> . @prefix dbp: <http://dbpedia.org/resource/> . @prefix nyt: <http://data.nytimes.com/> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . ex:JR a foaf:Person ; ex:age "40" ; ex:name "Jochen Rau" ; ex:likes dbp:TYPO3 ; ex:likes dbp:Wine ; ex:livesIn nyt:Massachusetts .
  19. 19. Turtle And even more syntactic sugar @prefix ex: <http://example.org/> . @prefix dbp: <http://dbpedia.org/resource/> . @prefix nyt: <http://data.nytimes.com/> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . ex:JR a foaf:Person ; ex:age "40" ; ex:name "Jochen Rau" ; ex:likes dbp:TYPO3 , dbp:Wine ; ex:livesIn nyt:Massachusetts .
  20. 20. RDF at a Glance Simple, ubiquitous way of modeling data Main concepts Triples of subject, predicate, and object Unique names for resources Objects can also be literal values (with data type or language) Performant data stores (e.g. Virtuoso, AllegroGraph, BigOWLIM) Existing frameworks with rich APIs (e.g. JENA, Sesame, Erfurt) Billions of triples as Open Data available (e.g. Wikipedia, MusicBrainz) Many di erent serialization formats (e.g. RDF/XML, Turtle, N3) Makes data migration much easier
  21. 21. Description Logic and Rules OWL and RIF What? Why? Knowledge is spread all over the system: Domain model, database scheme, TS con gurartion, FlexForm, TCA, documentation, Templates ... In di erent Formats: SQL, TypoScript, XML, PHP, HTML ... Using inconsistent terminology: "Template" in TYPO3? So, what to do? data and metadata in the same data structure (RDF) use well de ned languages to describe (meta)data (OWL RIF)
  22. 22. Description Logic and Rules OWL and RIF Knublauch, Holger. KBeans Specification: Semantic Transparency for Components and Domain Models. Technical Report FAW-TR-01001, FAW Ulm, 2001.
  23. 23. RDF in HTML Three di erent standards to markup your HTML code Microformats Microdata (part of HTML5 spec) RDFa ("RDF for attributes", W3C Recommendation) A subset of RDF Makes web pages machine readable by your favorite search engine
  24. 24. RDF in HTML RDFa <div> <p> Alice Birpemswick </p> <p> Email: <a href="mailto:alice@example.com">alice@example.com</a> </p> <p> Phone: <a href="tel:+1-617-555-7332">+1 617.555.7332</a> </p> </div>
  25. 25. RDF in HTML RDFa <div prefix="foaf: http://xmlns.com/foaf/0.1/" about="http://example.com/resource/alice" typeof="Person"> <p property="foaf:name"> Alice Birpemswick </p> <p> Email: <a rel="foaf:mbox" href="mailto:alice@example.com">alice@example.com</a> </p> <p> Phone: <a rel="foaf:phone" href="tel:+1-617-555-7332">+1 617.555.7332</a> </p> </div>
  26. 26. RDF in HTML RDFa <div prefix="foaf: http://xmlns.com/foaf/0.1/" about="http://example.com/resource/alice" typeof="Person"> <p property="foaf:name"> Alice Birpemswick </p> <p> Email: <a rel="foaf:mbox" href="mailto:alice@example.com">alice@example.com</a> </p> <p> Phone: <a rel="foaf:phone" href="tel:+1-617-555-7332">+1 617.555.7332</a> </p> </div> http://example.com/resource/alice
  27. 27. RDF in HTML RDFa <div prefix="foaf: http://xmlns.com/foaf/0.1/" about="http://example.com/alice#me" rel="knows"> <ul> <li typeof="Person"> <a rel="foaf:homepage" href="http://example.com/bob" property="foaf:name">Bob</a> </li> <li typeof="Person" > <a rel="foaf:homepage" href="http://example.com/eve" property="foaf:name">Eve</a> </li> <li typeof="Person" > <a rel="foaf:homepage" href="http://example.com/manu" property="foaf:name">Manu</a> </li> </ul> </div>
  28. 28. RDF in HTML RDFa <div prefix="foaf: http://xmlns.com/foaf/0.1/" about="http://example.com/alice#me" rel="knows"> <ul> <li typeof="Person"> <a rel="foaf:homepage" href="http://example.com/bob" property="foaf:name">Bob</a> </li> <li typeof="Person" > <a rel="foaf:homepage" href="http://example.com/eve" property="foaf:name">Eve</a> </li> <li typeof="Person" > <a rel="foaf:homepage" href="http://example.com/manu" property="foaf:name">Manu</a> </li> </ul> </div>
  29. 29. RDF in HTML GoodRelations Vocabulary
  30. 30. RDF in HTML Enable RDFa in TYPO3 # Set the doctype and add common namespaces config.doctype = xhtml+rdfa_10 config.namespaces { xml = http://www.w3.org/XML/1998/namespace xmlns = http://www.w3.org/2000/xmlns/ xsd = http://www.w3.org/2001/XMLSchema# xhv = http://www.w3.org/1999/xhtml/vocab# rdfa = http://www.w3.org/ns/rdfa# rdf = http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs = http://www.w3.org/2000/01/rdf-schema# owl = http://www.w3.org/2002/07/owl# rif = http://www.w3.org/2007/rif# [...] dbo = http://dbpedia.org/ontology/ foaf = http://xmlns.com/foaf/0.1/ geo = http://www.w3.org/2003/01/geo/wgs84_pos# gr = http://purl.org/goodrelations/v1# cal = http://www.w3.org/2002/12/cal/ical# og = http://ogp.me/ns# v = http://rdf.data-vocabulary.org/# bibo = http://purl.org/ontology/bibo/ }
  31. 31. Demo
  32. 32. EXT:semantic SPARQL Client
  33. 33. Linked Data Cloud
  34. 34. Linked Data Cloud
  35. 35. Querying a Graph SPARQL W3C Recommendation Graph pattern matching Similar to SQL and Turtle
  36. 36. Querying a Graph Filter, Functions, Ordering ...
  37. 37. Querying a Graph Custom Functions
  38. 38. Querying a Graph Property Paths
  39. 39. Querying a Graph Property Paths and Inference
  40. 40. Querying a Graph Subqueries
  41. 41. EXT:semantic SPARQL Query Administration Default namespaces (RDFa default pro le) Syntax highlighting Code indentation Content Manager
  42. 42. EXT:semantic SPARQL Query Administration Default namespaces (RDFa default pro le) Syntax highlighting Code indentation Frontend and backend Content Manager
  43. 43. EXT:semantic Custom Content Elements Default layouts and custom HTML template code Support for pagination (dynamic query re-writing)
  44. 44. EXT:semantic Custom Content Elements Frontend Backend
  45. 45. EXT:semantic Custom Content Elements Query results variables are bound to the template variables and are used as labels in a human readable form
  46. 46. Demo
  47. 47. Developer Query Object Model class Tx_BlogExample_Domain_Repository_PostRepository extends Tx_Extbase_Persistence_Repository { public function findByTagAndBlog($tag, Tx_BlogExample_Domain_Model_Blog $blog, $limit = 20) { $query = $this->createQuery(); return $query->matching( $query->logicalAnd( $query->equals('blog', $blog), $query->equals('tags.name', $tag) ) ) ->setOrderings(array('date' => Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING)) ->setLimit((integer)$limit) ->execute(); } public function findNext(Tx_BlogExample_Domain_Model_Post $post) { $query = $this->createQuery(); $posts = $query->matching($query->greaterThan('date', $post->getDate())) ->setOrderings(array('date' => Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING)) ->execute(); return $posts->getFirst(); } }
  48. 48. Semantic TYPO3 Current Projects SPARQL Client (EXT:semantic, Jochen Rau) RDF/RDFa support (Sebastian Kurfürst, masters thesis) CMS ontology (Andreas Wolf, GSoC) Taxonomy and Categories (EXT:taxonomy, Fabien Udriot) Semantic persistence backend (EXT:semantic, Thomas Maroschik) Globally unique identi ers in v4 (EXT:identity, Thomas Maroschik) Tagging support for Editors (v4: RTE plugin, v5: Aloha)
  49. 49. Semantic TYPO3 Roadmap Improve usability of SPARQL Client Transform Domain Models into RDF(a) Transform OWL Ontologies into PHP Code and Metadata Extbase Query Object Model -> SPARQL Query
  50. 50. Semantic TYPO3 Vision
  51. 51. Semantic TYPO3 Vision
  52. 52. Semantic TYPO3 Vision
  53. 53. Demo
  54. 54. Thanks! Twitter @jocrau Email jochen.rau@typoplanet.de Blog http://blog.typoplanet.de Talk Lunch

×