You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The creation of notifications should eventually be handled using an external library, as a notification agent should not be responsible for creating the notification itself.
However, this is an important part of the notification lifecycle, as creation of notifications should be easy and straightforward for developers.
Different approaches are possible here.
Templating
A first approach to dynamically create notifications using templating tools.
Templating tools enable the quick and easy creation of RDF notifications, by only requiring a mapping to be provided for the template.
Templates also can help developers that are not familiar with RDF to create notifications that are in a correct RDF format.
Direct rdf injection
A second approach that can be used is to inject rdf data directly into the notification body.
This approach gives more freedom to adding data to an existing notification.
This solution works regardless of the RDF format of the notification, or the injected data.
However it may be more difficult for developers that are not familiar with RDF, and it also is less straightforward to use on te CLI.
Also in the case data is to be added to an object that does not have an identifier, this approach is not evident.
This approach is used to add the sender, receiver, cc and bcc metadata to the notification body. However here we run into this last issue that the notification root does not have an identifier, for which an issue has been opened here.
Approach
Currently, the approach to creating new notifications is done with templating.
The templating approach uses a JSON templating library.
This JSON templating library is used to create JSONLD templates, for which a mapping can easily be provided in the CLI and JavaScript interfaces.
This is solution that will probably be more familiar to developers working with JSON data.
It can also easily be used in the command line, as only minimal mapping has to be provided.
Dynamically creating notifications
External dependency
The creation of notifications should eventually be handled using an external library, as a notification agent should not be responsible for creating the notification itself.
However, this is an important part of the notification lifecycle, as creation of notifications should be easy and straightforward for developers.
Different approaches are possible here.
Templating
A first approach to dynamically create notifications using templating tools.
Templating tools enable the quick and easy creation of RDF notifications, by only requiring a mapping to be provided for the template.
Templates also can help developers that are not familiar with RDF to create notifications that are in a correct RDF format.
Direct rdf injection
A second approach that can be used is to inject rdf data directly into the notification body.
This approach gives more freedom to adding data to an existing notification.
This solution works regardless of the RDF format of the notification, or the injected data.
However it may be more difficult for developers that are not familiar with RDF, and it also is less straightforward to use on te CLI.
Also in the case data is to be added to an object that does not have an identifier, this approach is not evident.
This approach is used to add the sender, receiver, cc and bcc metadata to the notification body. However here we run into this last issue that the notification root does not have an identifier, for which an issue has been opened here.
Approach
Currently, the approach to creating new notifications is done with templating.
The templating approach uses a JSON templating library.
This JSON templating library is used to create JSONLD templates, for which a mapping can easily be provided in the CLI and JavaScript interfaces.
This is solution that will probably be more familiar to developers working with JSON data.
It can also easily be used in the command line, as only minimal mapping has to be provided.
Template file:
template.jsonld
CLI send notification
JS send notification
Concrete questions:
The text was updated successfully, but these errors were encountered: