22. November 2017

User Interface for Virtual Types

Virtual Types have long been a hidden gem in Structrs API-Builder module (available in the Enterprise Edition). To make this powerful feature more widely known, we introduced a new management interface for virtual types.
Before, the user had to know that virtual types existed and manually configure them in the CRUD section.

A picture is worth a thousand words

The following animated GIF demos some of the features of virtual types but one should study the documentation to learn about all the functionality of virtual types. (Click the image to open it in a new tab/window)

Example Use-Cases for Virtual Types

  • Highly customisable ExportVirtual Types allow users to tailor JSON documents to whatever format external APIs need.
    Some of the internal fields (id, typeetc) are ‘in the way’? Simply don’t include them or map them to a different name.
  • Highly customisable ImportVirtual Types can also be used for data creation. If, for example, an external API send an id property along, simply create a mapping which does not interfere with Structrs internal id property
  • Schema indirection to avoid refactorings in pagesUsers can create a virtual type per schema type and only use the virtual type in their application (REST-only) and if schema changes occur only the virtual type needs to be updated and the application can remain untouched.
Kai Schwaiger

This article is written by

Kai Schwaiger

The latest posts by Structr

Back to overview