Hi
I have been looking over the Tripledoc solid tutorial which I’ve found very instructive (wish I had found this earlier!). But I am a little unsure about something in Step 4.
To check if the Document tracking our notes already exists we do the following:
const notesListEntry = publicTypeIndex.findSubject(solid.forClass, schema.TextDigitalDocument);
From my understanding we are making an assumption here, namely that no other application has such an entry of schema.TextDigitalDocument. For example say a a different solid app wanted to store its data in the same format then wouldn’t it also have such an entry? And if not, how can we be sure this entry is for our “#notes” subject?
Thanks
Des
1 Like
Hi Des, that is exactly the intent of the Public Type Index: for different apps storing the same type of data (in the case of your example, schema:TextDigitalDocument
s) to store and read it from the same location, so that the user can transparently switch between the apps.
If you’re hesitant about storing your app’s data in the same place as another app, use of the public type index is completely optional. It is also possible to use your own terms, e.g. https://your.url/some/place#notesLocation
, and then use that to point to the location of the notes file from the user’s profile. That way, only apps who understand that https://your.url/some/place#notesLocation
points to a notes file will follow that link.
(If you do eventually want other apps to be able to be interoperable, you can formally define what https://your.url/some/place#notesLocation
means by creating your own vocabulary.)
1 Like
Ah great now I get it. Tx Vincent