RE: Getting started with Hydra

Hi John,

Great to see you here!

Comments inline


On Sunday, March 16, 2014 4:45 PM, john.walker wrote:
> Hi There,
>   
> Markus Lanthaler suggested via Twitter that I should take a look at
> Hydra for a project I'm working on right now and I'd like to know
> how/where to get started with Hydra and what the benefits are of using
> it.
>   
> What i'm doing is part of the PiLOD initiative [1], whose goal it is
> to promote the use of LOD in the Netherlands.
>   
> I'm working on one of the cases where we want to investigate best
> practices to use linked data in web applications and make the life of
> app developers easier. In particular we want to look at how JSON-LD
> can be applied and Hydra seems to also be very relevant.
>   
> The first thing we are looking at is how to provide a web service for
> vehicle registration data. The current web service is available as
> OData [2] and we want to basically map this to JSON-LD and provide an
> RDF vocabulary to define all the properties, etc. I'm currently
> working on the vocabulary and trying out writing it directly in JSON-
> LD just for the giggles [3].

I've had a glance at your vocabulary definition in JSON-LD. It looks good to me but I would strongly suggest to change the IRIs of the various concepts to use English terms instead of Dutch ones. So instead of rdvw:Voertuig I'd use rdvw:Vehicle. This would make the vocabulary more accessible to people outside the Netherlands and increase the likelihood of reuse. Just as in programming, it's a best practice to use English identifiers.

Also, have you checked (I haven't) whether such a vocabulary already exists?


> The initial version of the web service will be pretty simple and
> basically allow an agent to GET a description of a registered vehicle.
> The URI template will be something like:
> http://example.com/kentekenapi/{registration}
>
> The primary use case is that a user agent knows the registration of a
> vehicle and wants to look up more info about it.
>   
> Alongside this we might also provide paginated lists of registered
> vehicles, possibly with the option to filter the results by passing
> parameters in the request e.g. get the list of all red cars with
> manufacturer Ferrari.
>   
> Any help/advice is much appreciated.

Pretty good timing. We are currently discussing exactly such use cases. IRI templates can be expressed by hydra:IriTemplate [4], paginated lists by hydra:PagedCollection [5]. There's a proposal to add a hydra:memberTemplate (ISSUE-16 [6]) which would allow you to "GET a description of a registered vehicle" and there's hydra:search which allows you to filter collections. We are discussing how to improve that (you probably already saw some of the mails, the subject is "Hydra use case: Linked Data Fragments")

You can find more information about all this in our mailing list archive:

  http://lists.w3.org/Archives/Public/public-hydra/


HTH to give you a quick overview of what's supported by Hydra. I (and I'm sure everyone else on this list), would be happy to look at your use case in more detail to see how it can be realized with Hydra.


Cheers,
Markus

  
> [1] http://www.pilod.nl (in Dutch) 
> [2] http://datamarket.azure.com/dataset/opendata.rdw/vrtg.open.data 
> [3] https://gist.github.com/jaw111/9538081
[4] http://www.hydra-cg.com/spec/latest/core/#templated-links
[5] http://www.hydra-cg.com/spec/latest/core/#collections
[6] https://github.com/HydraCG/Specifications/issues/16


--
Markus Lanthaler
@markuslanthaler

Received on Monday, 17 March 2014 21:29:16 UTC