pldn / rdf-respec

A tool for showing rdf in respec-based technical documents and web standards
3 stars 1 forks source link

Alignment with ReSpec's in-browser architecture with JS #2

Open redmer opened 2 years ago

redmer commented 2 years ago

@rix012 pointed me to this excellent idea. I however think that the current architecture may not be compatible with the ReSpec architecture. ReSpec uses in-browser JavaScript modules that compose into the DOM.

The stated pre-compilation step, configuration, etc. imho does not align with that. Suggestions:

That would improve the feedback loop when writing ReSpecs with a local webserver, as there is no need for a render/compilation step that goes either through local Java or remote GitHub Actions.

Cf. OpenAPI plugin for ReSpechttps://lists.w3.org/Archives/Public/spec-prod/2022AprJun/0007.html cf. SPARQL templating with Snowman https://github.com/glaciers-in-archives/snowman

pmaria commented 2 years ago

This would indeed improve the feeback loop in local development, when working with html based respec configurations. Working in markdown (which many do) would still require an additional step.

We could explore both avenues. What do you think @architolk @Bakkej?

Bakkej commented 2 years ago

We could look into this more. With the path we are currently on we're not actually making a rdf2respec tool/library but rather a rdf2markdown one. Which fully fits our purpose.

We did look at using javascript libraries instead and the suggestion does seem to align with one of the possible solutions suggested by @architolk; Using a Javascript library to generate the html-representations on the fly, possibly using some API to fetch the rdf-resources. At the time the java application seemed the better fit since it seemed to pose fewer restrictions. E.g. we do not need to have a webserver or api available. Right now we don't nééd anything other than java and we can use everything else. We are free to use respec or simply a README.md in github.

RiX012 commented 2 years ago

Agreed, the repo name then suggest a transformation to ReSpec. rdf2md would be a better fit?

pmaria commented 2 years ago

We decided on rdf-template. See https://github.com/pldn/rdf-template

Bakkej commented 2 years ago

In light of this discussion we created the repository rdf-template. We opted for rdf-template instead of rdf2md since that better captured the essence.

This repository can be used to develop a JS library that fits within the respec architecture as described above.