W3C home > Mailing lists > Public > public-hydra@w3.org > June 2014

Re: Do supported operations of a class always expect instances of the class?

From: Tomasz Pluskiewicz <tomasz@t-code.pl>
Date: Tue, 17 Jun 2014 10:58:02 +0200
Message-ID: <CAAFOhSfUjMO=JCBHQE1Vwx_whE+hWuPmzh4rovCAaGTKZuWmGQ@mail.gmail.com>
To: Jindřich Mynarz <mynarzjindrich@gmail.com>
Cc: public-hydra@w3.org
You're welcome

On Tue, Jun 17, 2014 at 10:40 AM, Jindřich Mynarz
<mynarzjindrich@gmail.com> wrote:
> Hi Tom,
>
> thank you for providing your perspective. I suspected that my
> assumption about hydra:expects wasn't valid in all cases, but it's
> good to have your concrete examples that show cases in which the
> assumption doesn't hold.
>
> - Jindřich
>
> --
> Jindřich Mynarz
> http://mynarz.net/#jindrich
>
> On Tue, Jun 17, 2014 at 10:32 AM, Tomasz Pluskiewicz <tomasz@t-code.pl> wrote:
>> Hi Jindřich
>>
>> On Tue, Jun 17, 2014 at 9:49 AM, Jindřich Mynarz
>> <mynarzjindrich@gmail.com> wrote:
>>> Hi,
>>>
>>> if a hydra:Class supports a hydra:Operation, does it mean that the
>>> operation hydra:expects an instance of the class? Has the description
>>> of supported operation always the following shape?
>>>
>>> :Class hydra:supportedOperation [ hydra:expects :Class ] .
>>>
>>
>> I think that would be unnecessary and too rigid. Consider an example
>> of collections, to which you can post new members
>>
>> :Collection hydra:supportedOperation [ hydra:method "POST" ;
>> hydra:expects :CollectionElement ] .
>>
>> That's just off the top of my head but very common.
>>
>>>
>>> And analogously for class instances:
>>>
>>> :instance hydra:operation [ hydra:expects :instance ] .
>>>
>>
>> With instances the first thing I can think of is a more RPC style API,
>> where you post commands (think CQRS)
>>
>> :instance a :User ; hydra:operation [ hydra:method "POST" ;
>> hydra:expects :ChangePasswordCommand ] .
>>
>> Regards,
>> Tom
>>
>>>
>>> - Jindřich
>>>
>>> --
>>> Jindřich Mynarz
>>> http://mynarz.net/#jindrich
>>>
>>>
>>
>
>
Received on Tuesday, 17 June 2014 08:59:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 15:53:59 UTC