RE: Top-down workflow

Hi Marcos César,

Welcome on board.

On Tuesday, February 17, 2015 10:55 PM, Marcos César de Oliveira
> I joined this list recently. I'm experimenting with JSON-LD and Hydra
> to support a API redesign which I'm involved. I know that the
> preferred way to integrate Hydra with web services is to use tools
> like HydraBundle or hydra-java, but this is somewhat a bottom-up
> workflow, and, I think, not suitable for all use cases.

It is not "the preferred way".. it is just that till now we just have tools for this bottom-up approach.


> So, I reasoned if a top-down workflow, which starts with a API
> specification document, written using JSON-LD and the Hydra vocabulary
> has value. 

Definitely! In a lot of cases, I think it actually makes much more sense.


> The advantages that I can see are: design an API without
> needing a implementation, to involve non-developers in the process of
> design, implement the same API in diverse programming languages.

+1


> Accordingly, a tool set must exist to aid with this workflow. First,
> we could have a code generator tool to convert the API specification
> into the desired programming language. Also, we could have a tool to
> aid in writing the API itself.

Yeah. Especially the latter would be very helpful.


> In that sense, I developed a simple prototype used as a proof of
> concept of the code generator. It is very crude, and works only for
> Java as target. But it can be used to experiment with these ideas. The
> source-code is available at https://github.com/mcesarhm/hydra2java.

Cool! Thanks for sharing. If you want it to be featured on

   http://www.hydra-cg.com/#tooling

send a PR for https://github.com/HydraCG/hydra-cg.com


> I would be very grateful in getting feedback of yours about this idea,
> and about the prototype.

I think you should consider using a JSON-LD processor instead of requiring the JSON(-LD) to be in a specific form. While this makes the script slightly more complex, it makes it a much more reliable.

Are you also working on a Hydra API designer/editor?


Cheers,
Markus


--
Markus Lanthaler
@markuslanthaler

Received on Sunday, 22 February 2015 20:08:47 UTC