Question enthuware.ocejws.v6.2.298: wrong answer?
Moderators: Site Manager, fjwalraven
-
- Posts: 12
- Joined: Thu Nov 28, 2013 5:23 pm
- Contact:
Question enthuware.ocejws.v6.2.298: wrong answer?
How's it true that a client's state is changed by accessing a resource?
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: Question enthuware.ocejws.v6.2.298: wrong answer?
This is what Fielding says about it (Wikipedia)
Stateless
The client–server communication is further constrained by no client context being stored on the server between requests. Each request from any client contains all of the information necessary to service the request, and session state is held in the client. Important to note is that the session state can be transferred by the server to another service such as a database to maintain a persistent state for a period of time and allow authentication. The client begins sending requests when it is ready to make the transition to a new state. While one or more requests are outstanding, the client is considered to be in transition. The representation of each application state contains links that may be used the next time the client chooses to initiate a new state-transition.
-
- Posts: 12
- Joined: Thu Nov 28, 2013 5:23 pm
- Contact:
Re: Question enthuware.ocejws.v6.2.298: wrong answer?
I'm still doubtful. Even though it says:
I'll admit I don't understand the following:
It doesn't say that the request causes the client to change state. Though contrived, it may be argued that the client will use the data from the invocation to do something that causes a state change.The client begins sending requests when it is ready to make the transition to a new state
I'll admit I don't understand the following:
While one or more requests are outstanding, the client is considered to be in transition
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: Question enthuware.ocejws.v6.2.298: wrong answer?
To get a better understanding, just read chapter 5 of Fieldings dissertation
This article of Fielding explains it nicely:
Frits
This article of Fielding explains it nicely:
Regards,The name “Representational State Transfer” is intended to evoke an image of how a well-designed Web application behaves: a network of Web pages forms a virtual state machine, allowing a user to progress through the application by selecting a link or submitting a short data-entry form, with each action resulting in a transition to the next state of the application by transferring a representation of that state to the user.
Frits
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: Question enthuware.ocejws.v6.2.298: wrong answer?
I guess that is the concept of HATEOAS, hypermedia as the engine of application state.
REST architectural design has different levels.
The most basic level is using a URI to represent a resource.
The most advanced level is that a resource containing links to other resources URI's.
For example:
<FlightSchedule>
<FlightNumber>....
<DateTime> ....
<NextFlight>http://www.airlineExample.com/NextFligh ... NextFlight>
<PreviousFlight>http://www.airlineExample.com/PreviousF ... iousFlight>
</FlightSchedule>
The <NextFlight> and <PreviousFlight> are links to other resources.
The client can change the state of the resource by accessing either the next flight information or previous flight information.
Any feedback about this HATEOAS example?
REST architectural design has different levels.
The most basic level is using a URI to represent a resource.
The most advanced level is that a resource containing links to other resources URI's.
For example:
<FlightSchedule>
<FlightNumber>....
<DateTime> ....
<NextFlight>http://www.airlineExample.com/NextFligh ... NextFlight>
<PreviousFlight>http://www.airlineExample.com/PreviousF ... iousFlight>
</FlightSchedule>
The <NextFlight> and <PreviousFlight> are links to other resources.
The client can change the state of the resource by accessing either the next flight information or previous flight information.
Any feedback about this HATEOAS example?
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: Question enthuware.ocejws.v6.2.298: wrong answer?
Yeah, the concept of state can confuse people. The "state" that Fielding is talking about is the state in the client, not in the server (the server should remain stateless).
Regards,
Frits
Regards,
Frits
-
- Posts: 13
- Joined: Thu Apr 24, 2014 9:23 pm
- Contact:
Re: Question enthuware.ocejws.v6.2.298: wrong answer?
Code: Select all
A RESTful service has to use HTTP.
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: Question enthuware.ocejws.v6.2.298: wrong answer?
This question is testing a theoretical situation. Rest (and RESTful services) are not bound to a particulair transport protocol (check Fieldings dissertation). HTTP itself doesn't fulfill all the requirements of REST. Note that REST is not about HTTP (one protocol) but about an architectural style.
In other words in theory you could have REST over another protocol than HTTP however in the practical world there is no working alternative (yet).
In other words in theory you could have REST over another protocol than HTTP however in the practical world there is no working alternative (yet).
Who is online
Users browsing this forum: No registered users and 3 guests