Resource names are ???nouns,??? as they
refer to things. It is important to remember the distinction between resources and
their names. Just as the word ???apple??? is not itself an apple, the name http://
example.com/person/123 is just a name, not the resource itself. A corollary is that a
resource may have many names (though good REST style indicates that this should
be kept to a minimum, where possible).
In the same way, HTTPmethods are referred to as ???verbs??? because they specify an
action on a resource or its representation.
What Is REST? | 187
Fielding??™s thesis is very general; it actually applies to any ???network-based architecture.???
However, REST is most commonly applied to the World Wide Web and
HTTP, and we will constrain our subject of discussion in this chapter to REST??™s
application to HTTP. Necessarily, this will impose constraints and guidelines not
derived from Fielding??™s thesis. Therefore, the principles explained in this chapter are
a subset of those of Fielding??™s REST.
In some ways, REST is simply ???HTTPas it was meant to be.??? As the Web grew in
popularity, many of the original design decisions that guided HTTPwere ignored.
Developers of web applications tended to see things like HTTPverbs and response
status codes as incidental to the application, or as a triviality to be dealt with when
time allowed. Using HTTPas intended was often seen as unnecessary or arduous.
Pages:
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291