You are here:  Home  >  Data Education  >  Current Article

Web Developers Can Now Easily "Play" with RDFa

By   /  May 10, 2012  /  No Comments

Kids playingYesterday, we announced RDFa.info, a new site devoted to helping developers add RDFa (Resource Description Framework-in-attributes) to HTML.

Building on that work, the team behind RDFa.info is announcing today the release of “PLAY,” a live RDFa editor and visualization tool. This release marks a significant step in providing tools for web developers that are easy to use, even for those unaccustomed to working with RDFa.

“Play” is an effort that serves several purposes. It is an authoring environment and markup debugger for RDFa that also serves as a teaching and education tool for Web Developers. As Alex Milowski, one of the core RDFa.info team, said, “It can be used for purposes of experimentation, documentation (e.g. crafting an example that produces certain triples), and testing. If you want to know what markup will produce what kind of properties (triples), this tool is going to be great for understanding how you should be structuring your own data.”

The UI for Play is divided into three sections. In the upper left is a window for code input. Upon input, three representations become available: a basic version of the human-readable HTML output (to the right), and two tabs below: a graph visualization of the RDFa data, and the raw data itself (output in Turtle). There are some code snippet examples on the Play site for Person, Social Network, Event, Place, and Product, but the nature of the input is actually quite flexible. Entire HTML web pages, snippets, and even SVG and XML with RDFa can be entered and parsed. To see for yourself how SVG works in the tool, try copy/pasting the text in this example: http://static59.mediabistro.com/content/svg-monarch-example.txt.

We experimented with a snippet of code from Bifter, the web comic we featured in this story yesterday. Play processed the data almost instantaneously and the result is pictured below (full-sized image).

screen shot of Bifter input into RDFa.info play development environment.

Click to view full-size

Manu Sporny suggested some ways in which developers might use this tool in their workflows:

  1. to learn RDFa by trying it out and getting real-time feedback
  2. to ensure their web pages generate what they think they’re generating
  3. to debug their pages if some expected data isn’t showing up
  4. to optimize their markup by reducing the RDFa markup to the minimum necessary while ensuring that the data that they expect shows up.

W3C Standards; Community Effort

Yesterday, we reported on the W3C announcement that three RDFa specifications have been proposed as recommendations. This means that RDFa 1.1 has moved into a status where it is currently undergoing a one-month voting period at the W3C to ratify it among all 350+ member companies. After that, it will be an official Web standard. If your organization belongs to the W3C, you may want to ping your W3C representatives to vote in support of RDFa 1.1.

Additionally, while the HTML5+RDFa specification is in the last stages of development, Play supports HTML5+RDFa markup today. “The only things it doesn’t support,” says Sporny “are processing very HTML5-specific things like the ‘datetime’ attribute and the ‘data’ attribute in the OBJECT element. The core team is also discussing a change to address a corner-case in HTML5 related to when ‘rel’ and ‘property’ attributes are placed on the same element and an HTML5-specific term (like rel=”nofollow”) that doesn’t make sense for RDFa is used. So, fairly esoteric stuff, but corner-cases that need to be hammered out for a world standard.”

While RDFa.info focuses on W3C standards, it was created with the efforts of the RDFa community at large. This community includes many from the W3C staff and membership, including Ivan Herman, Semantic Lead at W3C, but W3C has no control over what happens at RDFa.info. The site truly was a group effort. As Sporny explained, “There was the RDFa processor in JavaScript, which we needed to be 100% RDFa 1.1 compliant – Alex Milowski did that fine work. There was the TURTLE syntax highlighting that makes all of the ‘parts’ of the raw data output easier to read – Brian Sletten did that work. Then there is the design of the tool, the UI, and the graph visualization – I did that work. Also, all the folks that work on the browsers, HTML5, SVG, XML, Bootstrap.js, jquery, D3.js… the amount of technology that has been created to bring this vision to life is staggering.”

More to Come

The creators are looking for the involvement of an even larger community — the site users themselves.  “People should certainly submit feature requests,” said Sporny, “but more importantly, we need help writing documentation, tutorials, and improving the site. We’ve set it up to be very easy to contribute and have your work show up on the site.” Indeed, within hours of the RDFa.info launch yesterday, the site had received two submitted changes (here and here) from outside the core team that were committed and published almost immediately. They were relatively minor changes, but demonstrated to the site creators that the open process was working.

When asked about future development plans for the site and the Play tool, Sporny responded, “We want to write much more documentation – mostly in the form of tutorials and HOW-TOs. For example, some really nice beginner guides
would be nice. Tutorials on how to markup people, places, photos, etc. would be good. Creating some developer how-tos like how to use an RDFa processor in Python, or Ruby – that would be nice. I think we’re going to try to start with the basics and build out from there.”

“That said, we will accept any tutorial or HOW-TO that anyone on the Web wants to put together. We may ask for changes, but the more documentation that’s out there, the better.”

You might also like...

The Future of Big Data: Next-Generation Database Management Systems

Read More →