Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@entryscape/rdforms
Advanced tools
RDForms (aka RDF Forms) is a JavaScript library that uses templates to describe how to edit, present and validate RDF. The library is intended to be used in web applications to ease the burden of developers to deal natively with RDF.
RDForms (aka RDF Forms) is a JavaScript library that uses templates to describe how to edit, present and validate RDF. The library is intended to be used in web applications to ease the burden of developers to deal natively with RDF.
RDForms is designed to be adaptable to different UI libraries. Currently, integrations are provided for the following three UI libraries:
Deeper documentation for RDForms can be found at rdforms.org.
The templates that drives RDForms are expressed as JSON structures. Templates can be divided into profile-level and field-level templates. A typical scenario is that a template author combines a set of field-level templates into a bigger profile-level template to meet a specific need. Such a profile-level template could correspond to well known application profiles (for example a dataset according the W3C Recommendation DCAT2) or correspond to a specific class in an ontology defined for a specific purpose in a project. Field-level templates are often reused across profiles but may require tweaking in various ways, for instance changing a label, restricting cardinality, refining a constraint etc. For this purpose there is an extension mechanism that allows tweaks to be made without forcing the template author to fork the template by making a full copy.
Read more about the templates in the reference guide at the documentation site.
In addition to the RDForms library you need to load the RDF library rdfjson and then initialize an Editor, Presenter or Validator on a DOM node. Below is a high-level example, for more detailed information on how to prepare the parameters look at the examples.
<script type="text/javascript" src="https://unpkg.com/@entryscape/rdfjson@2.3.0/dist/rdfjson.js"></script>
<script type="text/javascript" src="https://unpkg.com/@entryscape/rdforms@10.0.0/dist/rdforms.react.js"></script>
<script type="module">
// Make sure to provide the parameters graph, resource and template
new Editor({ graph, resource, template }, 'node_id');
<script>
The exact versions above (2.3.0 and 10.0.0) may vary, please check for yourself the latest versions in package.json. Naturally you can also use the built version in the dist folder, see the next section.
Before you can install dependencies and build RDForms you need to make sure you have nodejs, npm and yarn installed in your system. To install dependencies for RDForms:
yarn
To build RDForms:
yarn build:all
A good way to see the capabilities of RDForms is to take a look at the samples (generated from the examples, see section below). To generate the samples just run:
yarn build:samples
This will build the samples in the samples
directory. You'd need a web server to serve the samples. We provide a simple one for your convenience:
yarn serve:samples
Your browser should open automatically, otherwise access the samples at http://localhost:8080/.
You can develop the different UI libraries as well as the part of the generic code base by running the examples in the webpack-dev-server:
yarn dev:react
or
yarn dev:bmd
or
yarn dev:bootstrap
The examples serve two purposes:
The examples are outlined below:
Check example1/init.js for more.
Different from example1 in the sense that it loads the graph and template from separate files. Check example2/init.js for more.
Same template and data as in example2, but now the presenter is used instead. Check example3/init.js for more.
This examples shows how RDForms can be used as a form validator rather than just an editor or presenter. Take a look at the validation report inside the form presenter.
Check example4/init.js for more.
This examples utilizes pre-made templates to render forms. It can serve as a very good start for extending them and creating your own custom forms.
Check example5/init.js for more.
This example provides a ready output to check your form RDF output live.
Check example6/init.js for more.
This is a more advanced example providing some guidance on how to create your own choosers and register them to show on select fields in your forms. You can even have your data be fetched across the network.
Check example7/init.js for more.
FAQs
RDForms (aka RDF Forms) is a JavaScript library that uses templates to describe how to edit, present and validate RDF. The library is intended to be used in web applications to ease the burden of developers to deal natively with RDF.
We found that @entryscape/rdforms demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.