Schema.org-based Drupal Development

Schema.org was created to provide “a collection of schemas ... that webmasters can use to markup their pages in ways recognized by major search providers.” It is part of a broader effort to develop the semantic web, “a common framework that allows data to be shared and reused across application, enterprise, and community boundaries.”

The challenge until now in making data reusable in this fashion is that each website has its own data architecture and system for naming common objects. For example, many websites have pages that describe people. A “person” has certain attributes: a name, an address, a biography, etc. Many of these attributes are exactly the same or very similar from one website to the next, but they are not named in a consistent way, which makes it very hard for other computer applications such as search engines to scan a web page and accurately extract that information.

Schema.org attempts to remedy this situation by creating a standardized set of data types, with an accompanying set of properties that belong to that data type. The concepts behind this schema are roughly analogous to the concepts of “content types” and “fields” that define the data architecture of a Drupal website. In other words, a Schema.org data type is similar to a Drupal content type, and a Schema.org property is similar to a Drupal field.

Schema.org has compiled several hundred data types such as “Book,” “Map,” “VideoObject,” “BlogPosting,” “Person,” “JobPosting,” “SoftwareApplication,” etc. They have also defined more than 500 properties. Using the Scheme.org module for Drupal and other modules such as the Entity Fields Builder module, you can quickly and easily use these definitions as starting-points when defining your own content types and fields in Drupal. In addition to improving the speed and efficiency of website development and code reuse, this approach brings a number of other advantages as well:

  • Better searchability. Using the Schema.org module for Drupal, you can automatically and easily add markup to web pages that enables search engines to better recognize the semantic meaning of the content on those pages. This provides search engine optimization. Major search engines including Bing, Google and Yahoo! have agreed to recognized Schema.org-based markup in order to improve the display of search results.
  • Better interoperability. The Schema.org module provides RDFa markup, which means that the content on web pages can be extracted automatically using the SPARQL query language or as Google Rich Snippets. In effect, other websites and applications can use your Drupal site not just as a source of web pages, but as a sort of database from which information can be queried and programmatically retrieved.
  • Less rework. Using standardized schemas and naming conventions will alleviate the issue mentioned earlier, by making it easier to follow consistent naming conventions when defining entities and fields. Using Schema.org design patterns can therefore help reduce some of the inefficiencies that occure when Drupal developers are asked to do essentially the same thing on multiple client projects. For example, you may be asked to define a content type or other entity named “Organization” or “Event.” Usually the fields defined for this content type are very similar to the fields defined for an Organization content type that you or someone else built on a previous project. It would be nice if the code that was written when building that previous project could be reused, but often this is not possible because of discrepancies in how fields were named or other trivial differences that become blockers to code sharing and reuse.

Sheldon Rampton and Stéphane Corlosquet will discuss the current state of the Schema.org module for Drupal as well as the new Entity Fields Builder module, which leverages Schema.org to enhance the experience of defining and implementing data architecture for Drupal websites.

Schedule info
Status: 
Proposed
Session Info
Speaker(s): 
Track: 
Coding + Development
Experience level: 
Intermediate

Comments