Difference between revisions of "Deployment Guide"

From Linked Data Platform
Jump to: navigation, search
m (Re-use established linked data vocabularies instead of (re-)inventing duplicates)
(Add: Use canonical URIs)
Line 30: Line 30:
  
 
* Not properly handling q values is a major problem in implementations of content negotiation.
 
* Not properly handling q values is a major problem in implementations of content negotiation.
 +
 +
== Use canonical URIs for identity comparison ==
 +
 +
* Location and/or Content-Location header contains canonical URI
 +
* Clients should use canonical URI when comparing resources for "same-ness" (identity), even if the resources are accessed via distinct URLs.
 +
* Most common case is URLs that vary by protocol, one HTTP and one HTTPS, but are otherwise identical.  In most cases those two URLs refer to the same resource, and the server should respond to requests to either URL with a single (canonical) URL.

Revision as of 19:01, 7 January 2013

This page collects various informative material, including best practices, design patterns and anti-patterns, related to LDP. It may or may not become a formal deliverable of the Working Group.

1 Use relative URIs

See ldp-ISSUE-29 (Relative URIs): Relative URIs are


  • crucial in creation of resources as the client cannot know what the name of the to be created resource is going to be
  • relative URIs are helpful on the server:
    • they allow editing of information on the file system to closely match the results from the web server. This makes it possible to debug without needing the server to be running
    • mappings from OO or SQL to RDF need not be encumbered with information about the name of the server, which may only be available at a much later point.

2 Represent container membership with hierarchical URIs

  • Hierarchical URIs are good for containers because they enable relativizing.

3 Use fragments as entity identifiers

  • Fragments are nice because they can be expressed as relative URIs on the document describing them.

4 Prefer standard datatypes

5 Re-use established linked data vocabularies instead of (re-)inventing duplicates

6 Properly use q values

  • Not properly handling q values is a major problem in implementations of content negotiation.

7 Use canonical URIs for identity comparison

  • Location and/or Content-Location header contains canonical URI
  • Clients should use canonical URI when comparing resources for "same-ness" (identity), even if the resources are accessed via distinct URLs.
  • Most common case is URLs that vary by protocol, one HTTP and one HTTPS, but are otherwise identical. In most cases those two URLs refer to the same resource, and the server should respond to requests to either URL with a single (canonical) URL.