P
P
P_Alexander2018-05-05 19:08:58
Java
P_Alexander, 2018-05-05 19:08:58

What tasks should RESTful perform?

Hello, I apologize in advance, gentlemen, if I ask a game ... I started to study the REST web service, after reading 3, 4 articles, there are still questions, namely:
1 I know that rest can work with json, xml, html with the first two it is clear that I applied he returned the first or second one to some server, but with the third one it’s not clear whether it’s real that the web service returns the real page to the user as html ??
2 Can the client part of the Rest Service be deployed on the same server as the server part? All the examples that I saw the client side were written in Maine, is it generally written on web servers?
3 So I wrote a corny simple server part of the Rest service, I make a GET request in the browser and receive records from the database in response, here I am already a client! why write it then?
4 For example, a rest service for ordering coffee, I understand it this way, I went to the site and bought a coma, I came home, is the client part written there? What does the rest service return there, a full page, or does it covertly process, for example, the payment for coffee?
5 User authentication, how does it work in general? the user has entered the site and must go through auntification in order to gain access to the information, it turns out that the client part of the REST service should be deployed on this server, where is the server part of the REST service, right ??
I understand that wildly stupid questions, but please explain to me or throw off the information about this! I will be extremely happy! Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
JimmDiGreez, 2018-05-05
@P_Alexander

1. I have not seen it myself, but I will assume that there will be some norms for widgets.
2. Rest, of course, is written on the server. And the client, even a Baba Yaga, should not worry about the rest of the service. Unless specifically prohibited.
3. item 2
4.5. no. You can invent any authentication protocol. It is enough that he be stateless.
Generally in vain you mix rest as the client and the server at the same time. Rest only server.

S
Sergey Gornostaev, 2018-05-05
@sergey-gornostaev

REST is just one of the conventions for how the server should communicate with the client. Your question of the class "What tasks should the Russian language perform."

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question