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

Re-edit 2024-09-11.md with omitted changes from #683 #686

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions meetings/2024-09-11.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@
## Topics

### Work in Progress: Semantizer library and a React-Admin app demo
* Maxime Lecoq-Gaillard (lecoqlibre): I would like to make a quick demo of Semantizer, a TypeScript library I'm working on to make Solid apps (it could be used to create non-Solid apps too). Semantizer is based on the RDFJS interfaces and use mixins. Users can define their own mixins very easily to add methods to manipulate their data. Currently some mixins already exist like the WebId, the SolidWebId and the TypeIndex ones. I will also add a Comunica mixin soon to run SPARQL queries directly on the data.
* MLG: The demo will be in the domain of agriculture. Let's starts with taking a look at the datasets in my POD. All starts from the WebId profile of a person (representing a food producer). In its profile, the producer is affiliated to some enterprises. Enterprises have their own profile in which they list catalogs which are linked to some products (catalog items). The demo will show the catalogs of the producer being fetched from its WebId. The demo will also make use of extended profiles (linked in the person and the enterprise profiles).
* MLG: First we can see the React-Admin app and later the code. We can see in the network console of the browser that the app is fetching my WebId, then the extended profile, then the enterprise and its extended profile where it finds links to the catalogs. On the interface of the app, we can see the list of catalogs of the producer. We can click on a catalog to see the contained catalog-items. In the code it is really simple, we load the documents (datasets) in the order explained above.
* MLG: Once I fetch/load the first dataset (profile), I can use mixins. With mixin I have access to methods I can call on the dataset to access to data in an easy way. With only few lines I can easily query the pod. I can also show you another example. A bit of code I'm working on for Startin'Blox which shows the usage of the TypeIndex mixin: I can get the TypeIndex by simply call the `getPublicTypeIndex` method. Then I can directly access to a registration instance with the dedicated method `getRegistratedInstanceForClass`.
* Maxime Lecoq-Gaillard (lecoqlibre): I would like to make a quick demo of Semantizer, a TypeScript library I'm working on to make Solid apps. (It could be used to create non-Solid apps, too.) Semantizer is based on the RDFJS interfaces and uses mixins. Users can define their own mixins very easily to add methods to manipulate their data. Some mixins already exist, like the WebId, SolidWebId and TypeIndex ones. I will also add a Comunica mixin soon, to run SPARQL queries directly on the data.
* MLG: The demo will be in the domain of agriculture. Let's start by taking a look at the datasets in my pod. All start from the WebId profile of a person (representing a food producer). In its profile, the producer is affiliated with some enterprises. Enterprises have their own profiles, in which they list catalogs which are linked to some products (catalog items). The demo will show the catalogs of the producer being fetched from its WebId. The demo will also make use of extended profiles (linked in the person and enterprise profiles).
* MLG: First, we can see the React-Admin app, and later the code. We can see in the network console of the browser that the app is fetching my WebId, then the extended profile, then the enterprise and its extended profile, where it finds links to the catalogs. On the interface of the app, we can see the list of catalogs of the producer. We can click on a catalog to see the contained catalog-items. In the code, it is really simple; we load the documents (datasets) in the order explained above.
* MLG: Once I fetch/load the first dataset (profile), I can use mixins. With mixins, I have access to methods I can call on the dataset to access to data in an easy way. With only few lines, I can easily query the pod. I can also show you another example. A bit of code I'm working on for Startin'Blox which shows the usage of the TypeIndex mixin: I can get the TypeIndex by simply calling the `getPublicTypeIndex` method. Then I can directly access a registration instance with the dedicated method `getRegistratedInstanceForClass`.
* eP: Can you show us how you define those mixins.
* MLG: Mixin are very easy to define. It is just a mixin function in TS in which you define some methods you want to add to your dataset. You also have to export a factory to create and load instances of your mixin (an helper is available).
* MLG: Mixins are very easy to define. It is just a mixin function in TS, in which you define some methods you want to add to your dataset. You also have to export a factory to create and load instances of your mixin. (A helper is available.)
* eP: Do you have an example of using multiple mixins on the same resource?
* MLG: Yes, for instance the SolidWebID mixin uses the WebIDMixin and the DatasetMixin. The DatasetMixin is the base mixin which adds the URI of the dataset.
* MLG: Yes. For instance, the SolidWebID mixin uses the WebIDMixin and the DatasetMixin. The DatasetMixin is the base mixin which adds the URI of the dataset.
* eP: Could you use WebID mixin and Vcard mixin together for example?
* MLG: Yes, mixins can be mixed like wanted to add an unlimited number of methods to manipulate the data.
* MLG: Yes, mixins can be mixed like you wanted, to add an unlimited number of methods to manipulate the data.
* eP: How do you compare it to LDO and the class based approach used by Noel?
* MLG: LDO only defines properties to access underlying data (defined from a shape). If you want to add methods to LDO objects you have to do it by yourself. Semantizer can be used to do so as it can work with any RDFJS compatible dataset. Semantizer can be used to add some methods to LDO objects for example to lint, add logic or compute some values. Semantizer also supports blank nodes (which the lib of Noël does not).
* MLG: LDO only defines properties to access underlying data (defined from a shape). If you want to add methods to LDO objects, you have to do it by yourself. Semantizer can be used to do so, as it can work with any RDFJS compatible dataset. Semantizer can be used to add some methods to LDO objects; for example, to lint, add logic, or compute some values. Semantizer also supports blank nodes (which the lib of Noël does not).
* MdJ: Is this code public?
* MLG: Yes but not stable yet. It will be released under MIT license. We have a TS version, but also Ruby and PHP (which are not aligned with the TS version and should not be used yet). It was first created for the Data Food Consortium project. We have a code generator that generates different languages from an UML model.
* TS version: https://github.com/assemblee-virtuelle/semantizer-typescript/tree/dataset (not stable, should not be used yet, no upated docs).
Expand Down