- From: James M Snell <jasnell@gmail.com>
- Date: Fri, 7 Nov 2014 11:50:26 -0800
- To: Markus Lanthaler <markus.lanthaler@gmx.net>
- Cc: "public-socialweb@w3.org" <public-socialweb@w3.org>
There is absolutely nothing in the current model stopping you from doing exactly what you and elf are suggesting here. Note that the property definitions do not say that the values MUST only be as:Link. As Owen has repeatedly pointed out, not every implementer wants to follow the pattern you and elf are suggesting for this... and it's for those cases that as:Link exists. On Fri, Nov 7, 2014 at 11:41 AM, Markus Lanthaler <markus.lanthaler@gmx.net> wrote: > On 7 Nov 2014 at 03:41, James M Snell wrote: >> On Thu, Nov 6, 2014 at 1:25 PM, Markus Lanthaler >> <markus.lanthaler@gmx.net> wrote: >> [snip] >>> >>> OK... I think I now understand the reasoning behind this. I find as:Link even more >> confusing now. Why model this more explicitly to make it easier to understand what >> information is expressed. >>> >>> "image": { >>> "@type": "as:MediaObject", >>> "mediaType": "image/jpeg", >>> "width": 250, >>> "height": 250, >>> "contentUrl": "http://example.org/martin/image", >>> } >> [snip] >> >> I honestly don't see how this is better. All you've done is change one >> name from as:Link to as:MediaObject and another name from "href" to >> "contentUrl". That doesn't seem better to me. (Perhaps we should name >> it as:BikeShed ;-)...) > > I think the crucial thing here is that we get rid of the "rel" property and use "proper" properties and types instead. The representation above makes it quite clear what the value of "image" is and why it is there. I expect people to struggle to understand why you would use > > "image": { > "@type": "http://www.w3.org/ns/activitystreams#Link", > "href": "http://example.org/martin/image.jpg", > "mediaType": "image/jpeg" > } > > instead of > > "image": { > "@id": "http://example.org/martin/image.jpg", > "mediaType": "image/jpeg" > } > > > More importantly though, the "rel" property changes the relationship between two resources > > "object" : { > ... > "image": { > "@type": "as:Link", > "href": "http://example.org/album/my_fluffy_cat_thumb.jpg", > "mediaType": "image/jpeg", > "rel": "preview" > }, > > So the value of image is not the image itself anymore but a preview (thumbnail) of that image. I would find the following representation much clearer for instance > > "object" : { > ... > "image": { > "@type": "as:MediaObject ", > "contentUrl": "http://example.org/album/my_fluffy_cat.jpg", > "mediaType": "image/jpeg", > "preview": " http://example.org/album/my_fluffy_cat_thumb.jpg" // or thumbnail > }, > > It is also easier to process in JSON-only clients as you don't have to filter an array of as:Links (by rel) to get to the link you are interested in. > > > Hope this clarifies it. As Pavlik suggested, I think having a handful examples covering the most important use cases will help to make a decision on this. > > > Have a nice weekend, > Markus > > > -- > Markus Lanthaler > @markuslanthaler > > > >
Received on Friday, 7 November 2014 19:51:13 UTC