Thanks for the reply and also thanks for cascading it to the user group.
I hope I will be able to publish a tutorial soonest - "Sample Bespoke AngularJS 
client to an Apache Isis RO server".
Thanks.


Ola Tomoloju


From: Dan Haywood [mailto:[email protected]]
Sent: Wednesday, March 12, 2014 5:31 PM
To: Tomoloju, Ola; users
Subject: Re: Isis AngularJS Client

Ola,
I'm cc'ing this to [email protected]<mailto:[email protected]>; happy to answer questions 
but prefer that they go on the users list where possible.
Thx
Dan

On 12 March 2014 16:43, Tomoloju, Ola 
<[email protected]<mailto:[email protected]>> wrote:

Please, advice on the best practice rule:

CREATE - @ActionSemantics(Of.IDEMPOTENT)?

generally this would be non-idempotent ... calling create and then create again 
will give you two objects, not one.

Of course, it is possible an action that acts like an "upsert", (if exists 
update else insert), in which case it would be idempotent.  The migration API 
that Estatio uses was written this way [1].




READ - @ActionSemantics(Of.SAFE)?

yes.



UPDATE - @ActionSemantics(Of.IDEMPOTENT) ?

depends ... more likely to be non-idempotent.

If its a simple update, then yes, idempotent.

But what about an action that transitions an object through its lifecycle (New 
-> Open -> Resolved -> Closed); invoking that action twice would move the 
object forward two states, not one.



DELETE -  @ActionSemantics(Of.IDEMPOTENT)?

generally yes.



HTH

Dan

[1] 
https://github.com/estatio/estatio/blob/master/dom/src/main/java/org/estatio/api/Api.java#L238

Reply via email to