Chapter 10. Embracing hypermedia and the Semantic Web

 

This chapter covers

  • Hypermedia and why it’s important for RESTful web APIs
  • Hypertext and hyperdata support in Restlet to drive applications
  • The relationship between REST and the Semantic Web
  • How Restlet can expose and consume linked data in RDF

As you’ve seen in the previous chapters, the Restlet Framework was designed on top of REST, the architectural style of the web. One of the benefits of that is that Restlet can be used to build all kinds of web applications, classic websites (Web 1.0), RIAs and web APIs (Web 2.0), and now even Semantic Web Services (Web 3.0).

In this chapter we cover in detail one of the core REST principles: hypermedia as the engine of application state (HATEOAS). This principle is important for designing RESTful web APIs but difficult to understand and implement correctly and pervasively. We’ll explain ways to support this principle and rely on our RESTful mail application to illustrate design options.

We’ll explain how Restlet can support the new hyperdata trend, describing its support for the RDF media type via a dedicated extension, on both the client and server sides. REST and the Semantic Web are a perfect match, and a concrete example of this is Restlet’s ability to expose and consume linked data in RDF. As an illustration you’ll “semantify” the mail application by adding support for semantic contacts using the FOAF standard format.

10.1. Hypermedia as the engine of RESTful web APIs

10.2. The Semantic Web with Linked Data

10.3. Exposing and consuming Linked Data with Restlet

10.4. Summary

sitemap