Re: Client POC

2015-11-18 17:22 GMT+01:00 Karol Szczepański <karol.szczepanski@gmail.com>:

> 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.

We've already created this in Pomona, so please take a look at our
work. It's probably the most ugly part of the code base, but combined
with the new JSON-LD and Hydra based serialization format, we'll
rewrite it. The interesting class is here:

https://github.com/okb/Pomona/blob/develop/app/Pomona/CodeGen/ClientLibGenerator.cs

> 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.

Ok, I see.

> 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.

Yes, describing arrays is a necessity.

> 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.

I'm looking forward to seeing where you take this. Good luck! :)

-- 
Asbjørn Ulsberg           -=|=-        asbjorn@ulsberg.no
«He's a loathsome offensive brute, yet I can't look away»

Received on Thursday, 19 November 2015 12:01:29 UTC