On Wed, May 13, 2009 at 4:20 PM, Roger Menday <roger.menday@uk.fujitsu.com> wrote:
I totally agree.On 13 May 2009, at 15:13, Sam Johnston wrote:On Wed, May 13, 2009 at 3:40 PM, Roger Menday <roger.menday@uk.fujitsu.com> wrote:
> I am not feeling comfortable with having a state model whichI don't share your pessimism, but then again, I also think we are
> will change on the fly, depending what a resource will
> answer. For one thing, it will make user interfaces and
> tools really difficult to design:
>
> - should I add a suspend button, even if it works only sometimes?
> - if it worked once, will it work again?
> - what can I do if it does not work? I want to suspend,
> dammit! ;-)
getting our wires crossed. I think there is a lot of help here from
hateoas which does a lot to address your concerns above (??)
That was exactly the point of introducing both together - given that most of the innovation is going to happen server side, clients should be as dumb as possible. That is, it doesn't matter if a new state comes along after a client has shipped because it will be advertised as a potential transition (HATEOAS), perhaps even with the expected target state.
The temptation is to assume that infrastructure is a simple problem with a fixed domain but I can assure you this not the case - without allowing for such flexibility each implementor will find themselves having a good chance of running into functions they are not able to expose via the API, or which the API expects but which are not present (for example, if "stop" implicitly results in "destroy" should we offer "stop" at all?).
My point was I wanted to talk about the "states as verbs" model which currently on the wiki ...