Creating Forms and Views With SHACL 1.2
Summary
SHACL 1.2 UI is introduced as a declarative, RDF-based framework for generating user interfaces, drawing parallels to the earlier XForms technology. It aims to simplify the creation of read-only views and editable forms for knowledge graphs by defining UI components directly within SHACL shapes. The framework distinguishes between `shui:viewer` for display and `shui:editor` for input, offering a comprehensive list of specialized components for various data types, including literals, numbers, booleans, dates, IRIs, and structured data. Key features include automatic UI generation, dynamic property computation, content ordering, and role-based access control for securing sensitive information like PPI and PHI. While SHACL 1.2 UI is still under development, existing implementations based on the similar DASH vocabulary, such as TopBraid EDG/Composer and open-source projects like Kurrawong/shacl-ui, offer immediate practical application.
Key takeaway
For AI Engineers and Research Scientists building knowledge graph applications, adopting SHACL 1.2 UI (or its DASH predecessor) can significantly reduce manual UI/UX development costs. By defining forms declaratively within SHACL shapes, you can automate the generation of complex, secure, and dynamic interfaces, ensuring data consistency and enabling fine-grained access control. Consider experimenting with existing `dash:` implementations to gain practical experience before the `shui:` specification finalizes.
Key insights
SHACL 1.2 UI enables declarative, RDF-driven generation of dynamic user interfaces for knowledge graphs.
Principles
- Declarative UI simplifies complex form generation.
- Data intent drives UI display and editing.
- Role-based access controls enhance data security.
Method
Define UI components (viewers/editors) and their behaviors directly within SHACL node and property shapes using the `shui:` namespace, linking them to data properties and constraints.
In practice
- Use `shui:viewer` for read-only displays.
- Use `shui:editor` for interactive input forms.
- Replace `shui:` with `dash:` for current implementations.
Topics
- SHACL 1.2 UI
- RDF Data
- Declarative UI Generation
- Knowledge Graphs
- Form Design
Best for: AI Engineer, Software Engineer, Research Scientist
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by The Ontologist.