This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MY DATA MODEL IS NOT MY OBJECT MODEL | |
first, the data model (SQL, DocStore, FileSystem) is indepdendent of the object model in the program. for example, i might store customer information (including contact info, financial profile, and order history) in a database. and i might have an object model in my code that includes a customerSummary object. this customerSummary is not a data table. it is made up of details from each of the three data tables, tho. | |
MY OBJECT MODEL IS NOT MY RESOURCE MODEL | |
my HTTP resources might take into account the *context* of the user (e.g. visitor, customer, sales rep, admin) and offer different resources for each of them that exposes select customer data. e.g. the /public/customers/ resource might show a list of customer names only with a link to see detail if security context supports that. and the /sales/customer/ resource might list each customer along with recent order history and links to contact that customer directly, update the order history, etc. and the /private/customer/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
name: "Todo List", | |
items(href: '/lists/1203/items', next_href: "/lists/1203/items?page=2"): [ | |
item(href: '/items/1'): { | |
description: "Pick up pizza", | |
status: "completed" | |
}, | |
item(href: '/items/12'): { | |
description: "Eat pizza", | |
status: "non_started" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Date: 2013-05-06 | |
Author: @mamund | |
Note: Some ways to determine when a URI has an associated resolver and whether it SHOULD be resolvable. | |
--> | |
<root> | |
<scheme> | |
<!-- the scheme portion of the URI can indicate which (if any) resolver should be used --> | |
<example> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var querystring = require('querystring'); | |
var url = require('url'); | |
var request = require('request'); | |
var http = require('http'); | |
var util = require('util'); | |
var child_process = require('child_process'); | |
var config = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html | |
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | |
xmlns:http="http://www.w3.org/2006/http#" | |
xmlns:cnt="http://www.w3.org/2008/content#"> | |
<head> | |
<title>Example of HTTP in RDFa</title> | |
<style type="text/css"> | |
div[typeof="http:Request"] | |
{ | |
border: 1px solid black; |