
How I Explained REST to My Wife (2004) - bugBunny
http://tomayko.com/writings/rest-to-my-wife
======
ebbv
I can't stand the "blog post as conversation" format. It's fine if you're
quoting a conversation for one or two paragraphs, but for something this long
you should do me (the reader) the courtesy of speaking directly to me.

Also this is giving way too much credit for the creation of the URL. The
format of the URL is not some miracle, genius insight. It is a natural result
of network computing, and similar descriptors of how to find a file on a
remote system had existed previously for ages.

~~~
matt_yoho
This is an example of a Socratic Dialog[1], and relies on metaphor. It's in
that way a piece of art useful as a teaching tool, but as such it trades some
precision for the end effect.

1\. <http://en.wikipedia.org/wiki/Socratic_dialogue>

~~~
ebbv
This is condescending, and relies on the assumption that I don't know anything
about anything and just fell off the turnip truck last week.

I think something would have to be done with a bit more art and skill before I
would consider it Socratic dialogue. This is just a clumsy blog post that is
annoying to read, IMHO.

~~~
phillmv
>This is condescending, and relies on the assumption that I don't know
anything about anything and just fell off the turnip truck last week.

Well, obviously you didn't get it.

> but for something this long you should do me (the reader) the courtesy of
> speaking directly to me.

Your comment is also full of pointless vitriol.

I think it's one of the most succinct and well done explanations of an
abstract academese concept loads of people quote but few people seem to
understand. I refer to this blog post often.

~~~
ebbv
You sound upset. Chill out, buddy.

~~~
phillmv
Oh, me? I'm perfectly calm. I didn't want to sound too condescending.

------
peshkira
It's a great blog post, but it has been posted numerous times on HN. I don't
want to rant or anything, but I think we should start searching before
posting. Please correct me, if I am wrong.

cheers <http://news.ycombinator.com/item?id=763570>
<http://news.ycombinator.com/item?id=3396910>
<http://news.ycombinator.com/item?id=5186774>

~~~
bugBunny
well, sorry. It was shocking good and never seen b4 for me. But, it's so good
that I would like to read it again in a year or so :)

~~~
monochromatic
... what?

~~~
bugBunny
?

------
cerales
So Ryan Tomayko's conversions with his wife are akin in tone and style to a
language textbook aimed at tweens?

~~~
petercooper
Better than the equivalent conversation in our house.

Me: Hey, do you want to learn about a core principle of how the Web works? ;;
Her: Huh? ;; Me: You know, the thing Facebook runs on. ;; Her: Oh right. No
then.

It's lucky there are more interesting things than technology for us to talk
about, thankfully! :-)

------
zedr
What do you think about the separation of Web sites and Web services (so-
called APIs)? Shouldn't the Web site _be_ the Web service, and offer multiple
representations of its endpoints?

As a trivial example, consider that I have a blog located at the URIL
<http://www.example.org/posts/>

If I were to offer an API to other developers, I would have two options: 1)
serve posts as `application/json` at the URI
<http://www.example.org/api/v1/posts> ; 2) serve both `text/html` and a
`application/json` representations at the same URI
<http://www.example.org/posts> , handling the desired mime-type and API
version in the 'Accept' field of the HTTP request.

Which approach is better?

------
dgreensp
Yes, and we also have XML, the Academically Correct and proven-in-the-field
way to represent all entities.

I get the "URLs are nouns" metaphor, but I don't think it needs any additional
promotion or particularly favors HTTP over whatever else might emerge.

~~~
paulnechifor
Better yet, RDF. It's the final solution for data representation.

------
hobbyist
Correct me if I am wrong here. So, instead of the eloquent method of using
GET, POST and PUT on resources, the current practice is about the programmer
writing custom parsers to get the information they want and then use them
accordingly.

------
siamore
Isn't representation of resources what the semantic web is supposed to be
about? if I wanted to make someone understand the semantic web I would say
something like this,

ontologies are data with corresponding metadata about everything on a domain
or site.

These ontologies allow the data to be parsed automatically, i.e sites like
amazon could just make their data available as ontologies and third party
sites could "read through the sites for us". These third party sites serve as
a portal from where we could ask for what we want and they would in turn look
through the sites available (eBay, amazon etc) using the ontologies and get
the best deal for us.

------
UNIXgod
Yes it's a classic. Supplemental to RFC 2616.

------
keefe
most of explaining REST to my wife was linking her fielding's thesis. Pretty
happy with my life... :]

------
rikkus
He uses four metaphors to help explain this:

1\. Cleaning 2\. A coffee table 3\. Shopping 4\. A school

So was he explaining this to his wife in the 1970s? Because REST over HTTP
didn't even exist until the 90s.

------
Aardwolf
> Wife: You mean "http" like the beginning of what I type into the browser?

What browser does she use? It wasn't required to type that anymore for ages
already :)

~~~
8ig8
For what it's worth, this post is from 2004. Even with that in mind, this is
not a verbatim conversation; the style is Socratic inquiry.

------
shubhamjain
I don't wish to read essays but i guess it is just a way to transmitt
information on web, get and post methods, mainly.

~~~
icebraining
Nope, REST can apply to any channels, not just the web.

------
WayneDB
What a bunch of hogwash. Everything does not fit into the request/response
model of HTTP and the Internet is certainly the web.

~~~
sp332
Email (not webmail, but IMAP and POP etc) uses the internet but is not part of
the web. There are other examples but I think that's the easiest to see.

~~~
bct
"The web" isn't exactly a well-defined concept. There's a school of thought in
which anything with a URI is part of the web.

~~~
sp332
Emails don't have URIs. My email boxes don't have URIs. My main problem is
that there's no way to link emails together, so they're not really part of any
web.

~~~
glenjamin
Does mailto:person@example.com not count as a URI to your mailbox?

~~~
sp332
I meant /Inbox, /Trash, /Spam etc.

