I know that to create a stateless application, we need to translate the user state back and forth, and not on the server in which the user state is located.
However, there must be some state on the server, I read this article that the state stored on the server is called the state.So resource. If I'm right, the state of the client that we often call should be the same as the state of the application.
So, how do I distinguish between the two, as it will determine whether they should be stored on the server or transmitted.
Take the shopping cart as an example.
If it takes 5 steps to complete the purchase, the user phase in which it (# 3, # 4) looks like the state of the application, but does that mean if they close the browser and click again to pay, will it have to start from step 1?
How about items in his schedule? If we consider it as the state of the application, we need to put all the elements in the request. But if we do this when the user closes the browser and logs in again, he will not be able to find his products again, since the browser cannot remember all the elements. It seems that we should consider this as a state of resources. But if this is so, when the user clicks on payment, they will have another page: go pay or say "your basket is empty" depending on whether its basket is empty or not. Thus, the same queries with exactly the same parameter introduce a different result, can we say that it is stateless?
Maybe I understand something is wrong, can any body answer the question of how to distinguish different types of conditions and how to relate to them differently?
- , / / /. ( REST ).
?
, . . , , , , , , , , . , ( ), ( ).
, , ( ), , . //- . , cookie, ( ), . : 1) , 2) REST, cookie , cookie ( ).
RESTful Web Services:
The Flickr - , . , flickr.com, -
, , . , " ". " " , , . , , . , .
, , :
. , , . POST, PUT DELETE .
, , ( ). . , . , ., , . . , .
SO , : RESTfulness?
, , : 2 , .. , , , .-. , ., () .
HATEOAS , . , 2 , .