GET: retrieve a representation of the resource (a "safe" operation that makes no changes)
PUT: update the resource with a new representation (an idempotent operation)
POST: add additional state to the current representation (a non-idempotent operation)
DELETE: delete the current representation (an idempotent operation)
For the transfer of funds operation, there are multiple ways to model it. I would probably model the transfer as a more generic "transaction" rather than as a "transfer". One approach might be:
You have the following resources:
- Account1
- Account2
- TransactionTimeStamp
The banking application would effect a transfer of $100 from Account1 to Account2:
- POST Account1 (decrement by 100)
- POST Account2 (increment by 100)
- PUT TransactionTimeStamp
(Alternatively, you might have two resources to represent the transaction: Account1TransactionTimeStamp and Account2TransactionTimeStamp.)
Anne
On 7/3/06, Ashley at Metamaxim <[EMAIL PROTECTED]> wrote:
Anne wrote:> The resource in question, here, is the Trade. When the Trade is confirmed, you PUT "confirmed", and you POST to> PartyA and PartyB (also resources) a link to the Trade resource.The analogue in the "marry" case would be to PUT a "marriage contract" and POST a link to the two people involved. So are we obliged to model "marriage contract" to make the solution work? In this case it seems that the implementation is driving the modelling, which is not good in my book.Consider a "transfer" of $100 from Account1 to Account2. Do we have to have the "transfer" as a resource?Also, this solution implies that PUT and POST are complementary (i.e., in general, you need to use both) rather than alternative (i.e., you choose whether you want to use PUT or POST). Is that the case?RgdsAshley
__._,_.___![]()
SPONSORED LINKS
Computer software Computer aided design software Computer job Soa Service-oriented architecture
YAHOO! GROUPS LINKS
- Visit your group "service-orientated-architecture" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
- Re: [service-orientated-architecture] RESTful lightbul... Anne Thomas Manes
- Re: [service-orientated-architecture] RESTful lig... Ashley at Metamaxim
- Re: [service-orientated-architecture] RESTful... Eric Newcomer
- Re: [service-orientated-architecture] RES... Mark Baker
- Re: [service-orientated-architecture]... Dan Creswell
- Re: [service-orientated-architec... Mark Baker
- Re: [service-orientated-arch... Dan Creswell
- Re: [service-orientated-architecture]... Eric Newcomer
- Re: [service-orientated-architec... Mark Baker
- Re: [service-orientated-architecture] RESTful lig... Jan Algermissen
- Re: Re: [service-orientated-architecture] RESTful... Ashley at Metamaxim
Reply via email to
