building semantic content models in drupal 8
Who we are
Stephane Corlosquet
Software engineer at Acquia, Maintainer, Schema.org, RDF UI, etc. Member of the Drupal security team.
Kevin Oleary
Designer of Drupal 8 toolbar, edit in place, WYSIWYG, responsive preview, breakpoints, layout and Acquia products including Cloud, Lift, Commerce and Content Hub. Maintainer of Ember theme.
We must think things not words, or at least we must constantly translate our words into the facts for which they stand
― Oliver Wendell Holmes
content modeling
semantic web
What are we going to talk about?
Semantic content model creation
How to do it in Drupal now
What the future holds
SEMANTIC CONTENT CREATION
How to do it in Drupal now
What the future holds
some history
the code
<div vocab="http://schema.org/" typeof="Offer">
<span property="name">Blend-O-Matic</span>
<span property="price">$19.95</span>
<img src="four-stars.jpg" />
Based on 25 user ratings
</div>
the code
<div vocab="http://schema.org/" typeof="Offer">
<span property="name">Blend-O-Matic</span>
<span property="price">$19.95</span>
<div property="reviews" typeof="AggregateRating">
<img src="four-stars.jpg" />
<meta property="ratingValue" content="4" />
<meta property="bestRating" content="5" />
Based on <span property="ratingCount">25</span> user ratings
</div>
</div>
schema.org
in drupal 7
schema.org module
Gets RDFa fileld mappings in to Drupal
entity fields builder
Gets entire schema.org entities into drupal in one operation
COPE
Create once publish everywhere
Each atomic piece of content should have only one canonical version.
Semantic content model creation
How to do it in Drupal 8
What the future holds
SEMANTIC CONTENT CREATION
How to do it in Drupal now
What the future holds
the site owner
Responsible for managing the creation, storage and distribution of content.
the content author
Responsible for researching, and creating the individual pieces of content
Two personas
the site owner
Responsible for managing the creation, storage and distribution of content.
the content author
Responsible for researching, and creating the individual pieces of content
don't waste my time
problems:
- When I create an entity I want to start with a sane default that already has all the schema.org RDFa mapping as well as the sane default Drupal formatters so that I don’t have to do this over and over for each individual field
- When I build a site I want to start with a sane default content template so I don’t have to build every field, entity, relationship, and view from scratch
Content owner
more simply
- Give me a semantic entity template
- Give me a semantic content model template
Content owner
in drupal 8: RDF UI
more simply
- Give me a semantic entity template
- Give me a semantic content model template
Content owner
why do I need this?
?
entities and relationships
Album review
album
song
artist
concert
venue
genre
ticket
entities and relationships
Node
View
File
Term
album
song
artist
concert
venue
genre
ticket
Album review
to create this:
Create album entity
Create artist entity
Create song entity
Create artist entity reference view
- Show name field
Create genre taxonomy
- Find genres enumeration
- Download enumeration
- Add genres enumeration
Create genre entity reference view
Edit song entity
- Add genre field
- Add artist entity reference field
- Add audio file
Add song entity reference view
- Show song name
- show song genre
- Show song audio file
Edit album entity
- Add cover art field
- Add genre field entity reference
- Add artist field entity reference
- Add multivalve songs field
Create album entity reference view
Edit review entity
- Add album field
Edit album entity reference view
-
Show album name
-
Show album cover art
-
Show artist name
-
Show genre
ugh
we made it simpler
we can make it even simpler
the content model
as a feature
“I thought we didn’t need Features anymore now that we have the Configuration Management Initiative (CMI) in Drupal 8?”
music content
package
ALBUM
REVIEW
ARTIST
CONCERT
ALBUM
SONG
GENRE
TICKET
VENUE
Features
features module in 8
The future
to create this:
Create album entity
Create artist entity
Create song entity
Create artist entity reference view
- Show name field
Create genre taxonomy
- Find genres enumeration
- Download enumeration
- Add genres enumeration
Create genre entity reference view
Edit song entity
- Add genre field
- Add artist entity reference field
- Add audio file
Add song entity reference view
- Show song name
- show song genre
- Show song audio file
Edit album entity
- Add cover art field
- Add genre field entity reference
- Add artist field entity reference
- Add multivalve songs field
Create album entity reference view
Edit review entity
- Add album field
Edit album entity reference view
-
Show album name
-
Show album cover art
-
Show artist name
-
Show genre
to create this:
Create album entity
Create artist entity
Create song entity
Create artist entity reference view
- Show name field
Create genre taxonomy
- Find genres enumeration
- Download enumeration
- Add genres enumeration
Create genre entity reference view
Edit song entity
- Add genre field
- Add artist entity reference field
- Add audio file
Add song entity reference view
- Show song name
- show song genre
- Show song audio file
Edit album entity
- Add cover art field
- Add genre field entity reference
- Add artist field entity reference
- Add multivalve songs field
Create album entity reference view
Edit review entity
- Add album field
Edit album entity reference view
-
Show album name
-
Show album cover art
-
Show artist name
-
Show genre
we need a high level view
STANDARDIZATION
STANDARDIZATION
Spotify
Spotify
Foursquare
Echonest
Ticketmaster
Album review
Ticketmaster
ASCAP
Third-party APIs
album
concert
ticket
venue
song
genre
ARTIST
Semantic content model creation
How to do it in Drupal now
What the future holds
SEMANTIC CONTENT CREATION
How to do it in Drupal now
What the future holds
the content owner
Responsible for managing the creation, storage and distribution of content.
the content author
Responsible for researching, and creating the individual pieces of content
don't make me think
don't break my flow
SOME BACKGROUND
RDFaCE: RDFa Content Editor
linked data tools demo
for Drupal 8
- Video: Entity mapping
- Video: WYSIWYG mapping demo
- Module: https://www.drupal.org/sandbox/sachini/2494173
the future
never force authors to write markup
semantic tools in the wysiwyg
It should be the responsibility of a content management system to, as much as possible, interpret the intention of the author and structure the content accordingly
THE smart cms
take aways
- Labor-saving tools for site builders and authors can be the catalyst for linked data
- Drupal 8 now has the first level of tools for this
- We will soon have more powerful tools
- The future is a smart CMS in which more and more semantic meaning is inferred from the author by machine learning
Semantic Content Models Drupal 8 - 2015
By scor
Semantic Content Models Drupal 8 - 2015
- 3,606