How do i explained rest to my wife




















Ryan: Because it is capable of describing the location of something anywhere in theworld from anywhere in the world. You can think of itlike GPS coordinates for knowledge and information. Wife : For web pages? That guy, Roy Fielding, he talks a lot about what thosethings point to in that research I was talking about. The web is built on an architecturalstyle called " REST ". REST provides a definition of a "resource", which is whatthose things point to.

Wife : A web page is a resource? Ryan: Kind of. A web page is a "representation" of a resource. Resources are justconcepts. Ryan: Oh, right. A browsercan then go ask for a specific representation of the concept. Specifically, the browserasks for the web page representation of the concept. Wife : What other kinds of representations are there? Inmost cases, a resource has only a single representation. Wife : Like what? Itmeans a lot of different things to a lot of different people but the basic concept is thatmachines could use the web just like people do.

Wife : Is this another robot thing? Ryan: No, not really. But computers can use those same pro to cols to send messagesback and forth to each other. Wife : Why not? Web pages usually have images, right? Those are separate resources. Butthe important thing here is that very different kinds of nouns can be treated the same. Whether the noun is an image, text, video, an mp3, a slideshow, whatever.

When a browser GETs a resource for a human, it will ask for the human readable one. Look, we've been talking about this with a lot of abstraction. How about we take a real example. You're a teacher - at school I bet you have a big computer system, or three or four computer systems more likely, that let you manage students: what classes they're in, what grades they're getting, emergency contacts, information about the books you teach out of, etc.

If the systems are web-based, then there's probably a URL for each of the nouns involved here: student, teacher, class, book, room, etc. Right now, getting the URL through the browser gives you a web page. If there were a machine readable representation for each URL, then it would be trivial to latch new tools onto the system because all of that information would be consumable in a standard way. It would also make it quite a bit easier for each of the systems to talk to each other.

Or, you could build a state or country-wide system that was able to talk to each of the individual school systems to collect testing scores. The possibilities are endless. The only thing left to figure out is what the data should look like. Wife: So this is what you and all the computer people are working on now? Deciding what the data should look like? Ryan: Sadly, no. Instead, the large majority are busy writing layers of complex specifications for doing this stuff in a different way that isn't nearly as useful or eloquent.

Nouns aren't universal and verbs aren't polymorphic. We're throwing out decades of real field usage and proven technique and starting over with something that looks a lot like other systems that have failed in the past. We're using HTTP but only because it helps us talk to our network and security people less.

We're trading simplicity for flashy tools and wizards. Select the language you want to translate into English » Korean. Start translation.

Ryan: Some guy. He's smart. Wife: Oh? What did he do? Wife: How does it work? Ryan: The web? Wife: Yeah. Wife: You mean http like the beginning of what I type into the browser? Wife: Why? Wife: For web pages? Wife: A web page is a resource? Wife: I know what a URL is.. Wife: What other kinds of representations are there? Wife: Like what? Wife: Is this another robot thing? Wife: Why not? Wife: And now you need to talk to all the machines?

Wife: What? Wife: So how do the machines tell each other where things are? Wife: But when I'm looking at a web page, I don't think of it like that. Wife: What about verbs and pronouns and adjectives? Wife: I was just joking. Wife: I don't get it. Wife: I don't get it Wife: Okay Wife: Wow! That's weird. Ryan: Well, okay, but you can throw it away.

That was another joke, right? Wife: Sounds like GET is a pretty important verb. That stuff you type in there is one of the most important breakthroughs in the history of computing. Ryan went down a completely different path than I would have. I don't think most people who ask how the web works care about the http protocol. At least I wouldn't, if I didn't know better.

I think I'd be more interested in how the network infrastructure is laid out and how requests get from my computer to a server and the data back and rendered. The World Wide Web is an application that runs on the Internet. To describe the Internet when someone asks how the web works would be like describing how the iOS works when someone is curious about a specific app.

Well no. Part of the web is the internet. You can't skip the internet and talk about resource representation caching in REST. But I am talking about the web -- that's why I mentioned how pages are rendered. To take your analogy, it would be like describing Cocoa library when your wife asks how an app works. His "wife" seems to know exactly what questions to ask, and how to respond in precisely the correct manner as to move the conversation along: "Sounds like GET is a pretty important verb.

Vaanir on Dec 27, prev next [—]. Even though it's quite vague, even I learn one or two things, quite an interesting read! Something to share on Tweetbook I guess.



0コメント

  • 1000 / 1000