Difference between revisions of "Deployment Guide"

From Linked Data Platform
Jump to: navigation, search
(Prefer standard datatypes)
(Prefer standard datatypes)
Line 25: Line 25:
 
LDPR representations must use only the following standard datatypes. RDF does not by itself define datatypes to be used for literal property values, therefore a set of standard datatypes based on [XMLSCHEMA11-2] and [RDF-PRIMER] are to be used:
 
LDPR representations must use only the following standard datatypes. RDF does not by itself define datatypes to be used for literal property values, therefore a set of standard datatypes based on [XMLSCHEMA11-2] and [RDF-PRIMER] are to be used:
  
{|
+
{| class="wikitable" border="1" style="border-collapse: collapse; border: 1px solid #000"
| URI |  Description
+
| !URI |  !Description
 
| http://www.w3.org/2001/XMLSchema#boolean | Boolean type as specified by XSD Boolean
 
| http://www.w3.org/2001/XMLSchema#boolean | Boolean type as specified by XSD Boolean
 
| http://www.w3.org/2001/XMLSchema#date | Date type as specified by XSD date
 
| http://www.w3.org/2001/XMLSchema#date | Date type as specified by XSD date

Revision as of 22:49, 16 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

This was originally part of old Section 4.1.9 that was deleted from the FPWD based on resolution of ISSUE-6

LDPR representations must use only the following standard datatypes. RDF does not by itself define datatypes to be used for literal property values, therefore a set of standard datatypes based on [XMLSCHEMA11-2] and [RDF-PRIMER] are to be used:

 !Description Boolean type as specified by XSD Boolean Date type as specified by XSD date Date and Time type as specified by XSD dateTime Decimal number type as specified by XSD Decimal Double floating-point number type as specified by XSD Double Floating-point number type as specified by XSD Float Integer number type as specified by XSD Integer String type as specified by XSD String Binary type as specified by XSD Base64Binary Literal XML value as specified by RDF

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.