- From: Karol Szczepański <karol.szczepanski@gmail.com>
- Date: Wed, 18 Nov 2015 17:22:22 +0100
- To: Asbjørn Ulsberg <asbjorn@ulsberg.no>
- Cc: "Hydra" <public-hydra@w3.org>
Hi Asbjørn Following your thoughs... >> I'm not familiar with Pomona (though I know NancyFX quite well), but >> indeed >> my implementation relies on conventions (with optional attribute >> overridings). >Pomona is something we've made to solve not having anything like WSDL >in a REST API. Pomona generates a schema server-side and through this >schema, a C# client DLL is generated that can be downloaded and used >in a client application. There is an executable tool that passed the API entry point is able to generate a proxy classes that can be used by C# projects to communicate with the API. It's early stage and I aim to have it as a VS pluggable tool to add ReST Web References to projects. Unfortunately, lack of time prevents from proceeding with it. >>> Doesn't the new PagedCollection fix this? >> >> PagedCollection defines links to fixed urls (next, prev, etc.) in a given >> collection, but client is unable to craft direct links on its own. >Why would a client need to craft paging links on its own? Filtering, >ordering, etc., are of course dependent on user input and need to be >in the client's control, but paging? In the demo, if you add several items you'll notice a pager at the bottom - it's dynamically generated by the client based on number of items in the collection. This is the case I'm refering to - pure next/prev won't help - client needs to address each page. >>> Returning simple types is discouraged anyway, so I don't see that as a >>> big problem. RFC 7493[4] states: >>> >>> For maximum interoperability with such implementations, >>> protocol designers SHOULD NOT use top-level JSON texts >>> that are neither objects nor arrays. >> >> But this states that in order for maximum interoperability with previous >> RFC. >No, not really. It states that to preserve interoperability with >existing APIs and libraries. Still, case when an API expects/returns a collection of i.e. plain literals (like in the demo, persons has a Roles property that is an array of strings) fits in the RFC as it should be an array, but still Hydra is unable to describe that properly. I'll try to update the demo with few new features like client side validation. I'm looking forward for any further feedback on that demo. Regards Karol
Received on Wednesday, 18 November 2015 16:22:50 UTC