May 09, 2004

Service Oriented Enterprise:
"Call me silly for not liking an operation called, "getLastStockPrice". Call me dumb for not being able to figure out the REST equivalent of the operation."


The REST equivalent would be 'get'. The trick is to preface it with 'stockPrice'. So stockprice.get() might be a procedural language example. Or maybe server.get("stock/amzn/price") or maybe resource("stock/amzn/price").get() or maybe ...

2 comments:

jeff said...

Make the assumption that 'last' does not equal 'current'.

Now, are you making 'last' part of the url as well?
Is a relative concept like order now a resource?
Do you think that is a good idea?

The question isn't 'can it be done' - the question is can it be done in a manner that makes sense.

Mike said...

Sorry - missed the 'last' part.
In that case, I'm not sure of the meaning for getLastStockPrice(). What is 'last' relative to?