valueflows / forum.valueflo.ws

forum.valueflo.ws has moved to https://lab.allmende.io/valueflows/forum-valueflo-ws
3 stars 1 forks source link

Building functional systems with this vocab #25

Closed ahdinosaur closed 4 years ago

ahdinosaur commented 8 years ago

migrating a discussion from https://github.com/valueflows/agent/pull/37, so we have a dedicated issue to share learnings and discuss best practices for how we build functional systems with this vocab.

@fosterlynn: I don't think that all of this has to affect how we think of our building our functional systems. I certainly don't intend to make any changes to AgentType or AgentAssociationType in NRP! I am finding that this is like when I had to make the transition from relational to OO modeling structures. And that impedance mismatch never went away, we just manage it in the interface between the OO structures in the code and the relational database. This will be similar, we just manage it when we translate OO (or relational) data to rdf and back.

@ahdinosaur: that's really good to hear. i think we'll do the same for Holodex, since these RDF changes are adding complexity that i'd rather keep out of our app codebase and defer to an external translation module, which also means we won't feel tied to The JSON-LD / RDF Way if a better way of doing linked open data arises (e.g. ssb).

@elf-pavlik: @ahdinosaur I would find it very helpful if you could document somewhere in what exact way you see approach here adds complexity? To my understanding holodex as of now doesn't work with data distributed across different dataspaces (domains) on the web, I would expect certain increase in complexity while adding support for that.

@ahdinosaur: an id is a URL, so that's enough to handle data distributed across domains, assuming each domain provides the data in the proper format. anything more than a single state object exactly as the Holodex user interface code expects is additional complexity. my current thinking for how to handle this without adding large dependencies (e.g. jsonld) to the page load is to do the translation in the API so the UI can receive exactly what it expects without any special parsers. that isn't to say we won't support JSON-LD / RDF, we'll just have an API service layer that handles parsing, translation, caching, etc so the UI code doesn't have to. i'm still letting this simmer though.

almereyda commented 8 years ago

Where is this API service layer documented currently?

ahdinosaur commented 8 years ago

@almereyda it's an idea in my mind. i ended up doing the fetching, parsing, caching, etc in the UI code for linked-data-browser.

pmackay commented 8 years ago

Is there a need to define a typical API specification that different systems could use, which would work with model dataas defined by this vocab? Perhaps using RAML or Swagger, something like that?

ahdinosaur commented 8 years ago

@pmackay yeah i reckon so, since many developers i've talked to are confused by RDF-style Linked Open Data and instead want something they understand like what you suggest.

pmackay commented 8 years ago

I've been exploring that kind of thing on this project http://communitiesuk.github.io/waste-service-standards/, which is about creating digital waste/recycling service standards for local government. Its very close to Popolo. The intent was to have JSON-LD models and a simple REST API that follows hypermedia principles. And I've been building the API in RAML.

bhaugen commented 8 years ago

We will probably develop a pretty full API for NRP in the coming months. We will use the ValueFlows model and vocab for it, not the current NRP internal model. Will probably use Swagger for doc.

A lot of dependencies of that plan, though, on things that people say they want to do. But don't always follow through on.

bhaugen commented 8 years ago

@pmackay the waste service standards are really interesting. How are they working in practice? What's being done with them?

I'm also wondering about some of the details. For example, is name, color and image sufficient to identify a material? What if it's paper, but a different color? (I suppose for recycling, color matters, but what about other properties of paper that affect its recycling?)

pmackay commented 8 years ago

You can read more about the background and timeline here http://www.localdirect.gov.uk/product/local-waste-service-standards-project/ if interested :) We're at the start of beta phase where we're working to implement them. So the "in practice" bit is to be proven over the next few months.

Actually color for a material is related to the WRAP materials colours (see https://partners.wrap.org.uk/assets/3647/ for more info) so that property should be more specifically named.

almereyda commented 4 years ago

We have moved the ValueFlows organization from GitHub to https://lab.allmende.io/valueflows.

This issue has been closed here, and all further discussion on this issue can be done at

https://lab.allmende.io/valueflows/forum-valueflo-ws/-/issues/25.

If you have not done so, you are very welcome to register at https://lab.allmende.io and join the ValueFlows organization there.