What is the advantage of global resource URIs (i.e. Addressing)?

What is the advantage of resource references using universal URIs (like REST) ​​compared to using the proprietary id format?

For instance:

In the first approach, the entire URL is an identifier. In the second approach, only 5 is an identifier. What is the practical advantage of the first approach in the second?

Why does REST (seem) go out of its way to uphold the first approach?

- EDIT:

My question was confusing because it really asked two separate questions:

  • What is the advantage of addressing?
  • What is the difference between the two forms of URIs discussed above.

I answered both questions below using my own post.

+3
source share
7

:

1) URI?

RESTful Web Services (ISBN: 978-0-596-52926-0):

URI, " jellyfish": http://www.google.com/search?q=jellyfish. URI http://www.google.com. HTTP , Google -, URI . : " - google.com, " " " Google ".

. 1990- , ftp://URI FTP-, :" FTP ftp.example.com. pub/files/ file.txt. "URIs made FTP HTTP. :" ftp:// ftp.example.com/pub/files/file.txt ". , .

[...]

- -. - , .

2) ?

URI, . , , . , .

, URI . , Google Maps , , , .

3) URI ?

. URI , , . .

+1

.

, , .

0

.

, , .

0

, URL- - .

.

, 5 . URL- REST-, . Rails , /5 html -. . , .

URL- . url (?, =) .

0

URI REST, , - . , .

0
source

I think it all comes down to how you should adhere to the principles of Feng Shui.

-1
source

Source: https://habr.com/ru/post/1697643/


All Articles