SolidOS/solid-logic

All functions should pass NamedNodes not URIs

timbl opened this issue · 4 comments

timbl commented

in general in the whole rdflib.js and in the solidos stack a RDF object is passed as a NamedNode object rather than a string.
Here is an example where URI strings are used instead.

https://github.com/solid/solid-logic/blob/main/src/util/UtilityLogic.ts#L138

There may be other. Please change them all to pass NamedNodes -- like the function before not like the one after.

Developers using the code should get used to this consistency.

This also allows us to use Typescript more usefully. If all parameters are strings, then we don't get the value out of TS.

also when it comes to routing naming, include the word 'load' instead of 'get' when there is a web fetch.

@bourgeoa @theRealImy

(case I get the push running) how would then for example https://github.com/solid/solid-logic/blob/main/src/util/UtilityLogic.ts#L138 look like ?

const containerMembers = this.store.sym(url); possibly ? we have to consider the variable name, the passed parameter, the syntax.

as baby programmer I need some guidance. where would we find other occurences of URIs to be changed to named nodes ?

talking to Timea we found this could be a good first issue for me.

@ewingson a few lines above in same code you see a good example: https://github.com/solid/solid-logic/blob/8239044333ed2a06ca09596760e4783f6c95c85a/src/util/UtilityLogic.ts#L115
You can worry about making this consistent in solid-logic and then I can take it over and propagate it to other repos where they are used.
Basically, you can even change the name of variables if really really needed. However, I expect most work to be a change from string to NamedNode type and that is all.

see #38
please review.

[edit] see #45
can be closed after merge imo