Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
redmer opened this issue May 14, 2022 · 5 comments
Open

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

redmer opened this issue May 14, 2022 · 5 comments

Comments

@redmer
Copy link

redmer commented May 14, 2022

@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:

  • rdf-respec should be ECMA-262 based
  • rdf-respec should compile from TTL (etc), with templates to render into html along with all other ReSpec spec parts

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
Copy link
Collaborator

pmaria commented May 16, 2022

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
Copy link
Collaborator

Bakkej commented May 16, 2022

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
Copy link

RiX012 commented May 27, 2022

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

@pmaria
Copy link
Collaborator

pmaria commented May 27, 2022

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

@Bakkej
Copy link
Collaborator

Bakkej commented May 27, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants