SPARQL Web Pages (SWP) is a framework for building web interfaces based on
Linked Data and Semantic Web standards.
SWP is a unique technology that makes it very easy to build applications
that interact with RDF data.
With SWP, user interface snippets are attached directly to class definitions
in ontology models.
The framework can then automatically discover and select the most appropriate
user interface for any given resource.
User interface code becomes extremely flexible, modular and model-driven.
Note that SWP used to be called UISPIN and this name is still used in some
articles as well as for the base namespace.
Problem addressed by SWP
The vision of Linked Data and the Semantic Web is to create an open network
of information resources. While this web of data is growing rapidly, there
are few effective user interfaces for interaction with the resulting information spaces.
Existing applications are either:
-
Hard-coded viewers against some specific vocabularies - not able to
deliver on the promise of evolvable and a flexible information web; or
-
Custom user interfaces that rely on complex client-side scripting that
duplicates the knowledge already existing in ontology models - not taking
advantage of the power of self describing data; or
-
Entirely generic data browsers that present RDF-based content in a uniform
display of name/value pairs – missing usability requirements and disappointing
users who come to expect context-specific rendering
The generic browsers typically rely on introspection of the data, and possibly
consult the associated models to learn about the available properties for a resource
or class. However, in order to avoid simplistic renderings with flat lists of
properties, more information is needed than typically stored in an ontology.
Consider, for example, a class that defines properties ex:firstName and ex:lastName.
Without either hard coding or having additional information, it is impossible
for a browser to understand that those belong together and should be rendered
as text fields side by side.
Solution
SPARQL Web Pages is an open framework that can be used to attach RDF-based
instructions to resources and classes to enable generic code to display attractive and
context-appropriate visualizations of RDF resources.
Dedicated properties such as ui:view or ui:instanceView are used to link resources
with ui:Elements, which provide a data model that can be rendered into a variety of
views such as HTML and SVG.
The UI elements are driven by SPARQL queries represented in SPIN.
Different styles of development are supported:
-
For a quick demo, queries can be embedded directly into HTML
-
To create maintainable and scalable systems, SPIN templates encourage
query re-use and support the division of labor between HTML designers and the query experts
SPARQL Web Pages enable modelers to annotate their models with appropriate visualizations.
SWP delivers the vision of dynamic user interfaces that adjust their behavior driven by the
data and context. Developers using SWP benefit from the speed of development, ability to
directly leverage standard HTML/JavaScript skills as well as application flexibility and
ease of maintenance. Users exploring a Linked Data space benefit from customized
visualizations such as nicely laid-out forms, statistical charts and business intelligence reports.
SWP is not limited to the browse-only interface. It also supports editing of RDF data and models.
Examples
Simple Example (SWP source code on the left)
SWP is supported by all TopBraid products. In TopBraid Composer, you only need to click
on the Browser tab to see SWP-based HTML view of the displayed resource.
SWP Application Components
A key strength of SWP is its ability to define custom tags that can be used
alongside of HTML elements to insert snippets of reusable application building
blocks into web pages. These building blocks are called SWP Application Components
and can be used to quickly assemble powerful web applications. Included with TopBraid
is a growing SWP Application Component Library with pre-built trees, forms, grids
components as well as more sophisticated visualizations.
Experienced HTML developers can create and publish new custom components.
Existing components can be easily customized using a variety of methods such as CSS stylesheets.
To view help pages for SWA with embedded working examples, follow these steps:
download TBC-ME here
start TBC-ME
open a web browser and go to http://localhost:8083/tbl/swp?_viewClass=swadoc:Index.
Application Examples
EVN HTML Viewer
EPIM ReportingHub Log Viewer
|