69
REST, het web als database? Ron van Weverwijk Andrej Koelewijn

REST, the internet as a database?

Embed Size (px)

Citation preview

Page 1: REST, the internet as a database?

REST, het web als database?

Ron van WeverwijkAndrej Koelewijn

Page 2: REST, the internet as a database?

package com.sun.ws.rest.samples.helloworld.resources;

import javax.ws.rs.GET;import javax.ws.rs.Produces;import javax.ws.rs.Path;

// The Java class will be hosted at the URI path "/helloworld"@Path("/helloworld")public class HelloWorldResource {

// The Java method will process HTTP GET requests @GET // The Java method will produce content // identified by the MIME Media-type "text/plain" @Produces("text/plain") public String getClichedMessage() { // Return some cliched textual content return "Hello World"; }}

Page 3: REST, the internet as a database?
Page 4: REST, the internet as a database?
Page 5: REST, the internet as a database?
Page 6: REST, the internet as a database?
Page 7: REST, the internet as a database?
Page 8: REST, the internet as a database?

Wat is REST?

Page 9: REST, the internet as a database?
Page 10: REST, the internet as a database?
Page 11: REST, the internet as a database?

Rest Eigenschappen

Page 12: REST, the internet as a database?

1. Geef alles een ID

Page 13: REST, the internet as a database?

2. Link naar je afhankelijkheden

Page 14: REST, the internet as a database?

3. Gebruik de standaard HTTP Methoden

Page 15: REST, the internet as a database?

4. Stel je data in verschillende formaten beschikbaar

Page 16: REST, the internet as a database?

5. Communiceer zonder status

Page 17: REST, the internet as a database?

Architectuur Impact

Page 18: REST, the internet as a database?
Page 19: REST, the internet as a database?
Page 20: REST, the internet as a database?
Page 21: REST, the internet as a database?
Page 22: REST, the internet as a database?
Page 23: REST, the internet as a database?
Page 24: REST, the internet as a database?
Page 25: REST, the internet as a database?
Page 26: REST, the internet as a database?
Page 27: REST, the internet as a database?
Page 28: REST, the internet as a database?
Page 29: REST, the internet as a database?
Page 30: REST, the internet as a database?
Page 31: REST, the internet as a database?
Page 32: REST, the internet as a database?
Page 33: REST, the internet as a database?
Page 34: REST, the internet as a database?
Page 35: REST, the internet as a database?
Page 36: REST, the internet as a database?
Page 37: REST, the internet as a database?
Page 38: REST, the internet as a database?
Page 39: REST, the internet as a database?
Page 40: REST, the internet as a database?
Page 41: REST, the internet as a database?

LinkedData

Page 42: REST, the internet as a database?
Page 43: REST, the internet as a database?
Page 44: REST, the internet as a database?
Page 45: REST, the internet as a database?
Page 46: REST, the internet as a database?
Page 47: REST, the internet as a database?
Page 48: REST, the internet as a database?

<h2>About Dries</h2><div class="content"> <div about="#me" typeof="foaf:Person"> <a href="http://buytaert.net/images/blog/dries-buytaert-large-bw.jpg" rel="foaf:img"> <img src="http://buytaert.net/images/blog/dries-buytaert-small-bw.jpg" alt="Avatar of Dries Buytaert" style="display: block; margin-left: auto; margin-right: auto" /> </a> <p> <span property="foaf:name">Dries Buytaert</span>is passionate about the <span property="foaf:interest">web</span>, <span property="foaf:interest">open source</span>and <span property="foaf:interest">photography</span>. He is the original creator and project lead of <a href="http://drupal.org" rel="foaf:currentProject">Drupal</a>, an open source social publishing system. He is co-founder and chief technology officer of <a href="http://acquia.com" rel="foaf:workplaceHomepage">Acquia</a>, a venture-backed software company that offers products and services for Drupal. Dries is also working on <a href="http://mollom.com" rel="foaf:workplaceHomepage">Mollom</a>, a service that helps you identify content quality and that stops website spam. People often laugh at his hair but he is cool with that. <a href="/resume">More about Dries ...</a></p> </div></div>

Page 49: REST, the internet as a database?

<h2>About Dries</h2><div class="content"> <div about="#me" typeof="foaf:Person"> <a href="http://buytaert.net/images/blog/dries-buytaert-large-bw.jpg" rel="foaf:img"> <img src="http://buytaert.net/images/blog/dries-buytaert-small-bw.jpg" alt="Avatar of Dries Buytaert" style="display: block; margin-left: auto; margin-right: auto" /> </a> <p> <span property="foaf:name">Dries Buytaert</span>is passionate about the <span property="foaf:interest">web</span>, <span property="foaf:interest">open source</span>and <span property="foaf:interest">photography</span>. He is the original creator and project lead of <a href="http://drupal.org" rel="foaf:currentProject">Drupal</a>, an open source social publishing system. He is co-founder and chief technology officer of <a href="http://acquia.com" rel="foaf:workplaceHomepage">Acquia</a>, a venture-backed software company that offers products and services for Drupal. Dries is also working on <a href="http://mollom.com" rel="foaf:workplaceHomepage">Mollom</a>, a service that helps you identify content quality and that stops website spam. People often laugh at his hair but he is cool with that. <a href="/resume">More about Dries ...</a></p> </div></div>

Page 50: REST, the internet as a database?
Page 51: REST, the internet as a database?

Query Engines

Page 52: REST, the internet as a database?
Page 53: REST, the internet as a database?
Page 54: REST, the internet as a database?
Page 55: REST, the internet as a database?
Page 56: REST, the internet as a database?

let $images := doc("jdbc:mysql:localhost:localuser:images"),

$kw := doc("rdf.xml")

for $item in $rdf/triplets[relation = "locname"]

where

$item/value = "Tower of London"

and some $image in $images satisfies (

$image/uri = $item/uri

and $image/width = 1024 and $image/height = 768

)

return

$item/uri

Page 57: REST, the internet as a database?
Page 58: REST, the internet as a database?
Page 59: REST, the internet as a database?
Page 60: REST, the internet as a database?
Page 61: REST, the internet as a database?
Page 62: REST, the internet as a database?
Page 63: REST, the internet as a database?
Page 64: REST, the internet as a database?
Page 65: REST, the internet as a database?
Page 66: REST, the internet as a database?
Page 67: REST, the internet as a database?

REST, het web als database?

Page 69: REST, the internet as a database?

● http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm

● http://www.infoq.com/articles/rest-anti-patterns

● http://www.infoq.com/articles/tilkov-rest-doubts

● http://www.infoq.com/articles/subbu-allamaraju-rest