- The Structr Knowledge Graph
- About Structr
- Getting Started
- Installation and Setup
- Working with Structr
- Advanced Topics
Anatomy of a Structr Application
Structr is a standalone Java application running in an embedded Jetty servlet engine.
This article describes the installation of the Structr Java distribution package, available at https://structr.org/download. For details on the installation of Structr, see Installation and Setup. A Java Development Kit (JDK) Version 8 is required to run it. Please note that Structr is not yet compatible with Java version 9 or above due to some dependencies Structr relies on.
Please note: Structr makes use of the Java compiler at runtime, so the JRE alone is not sufficient to run Structr. You will need the JDK in any case. See also this FAQ.
Apart from the configuration and (optional) external Scripting, all parts of a custom Structr application are configuration data stored in a graph database. A typical Structr application consists of at least the following parts.
The data model of a Structr application can be designed visually with the Schema Editor. It is fully dynamic and can be modified and extended at runtime. The resulting Custom Types are compiled into Java classes, and Structr automatically creates a REST Resource for each type.
The business logic of a Structr application is stored in methods in the data model. Structr supports various Property Types and provides Callback Methods that are executed when an object of a certain type is created, modified or deleted. Additionally, Serverside Scripting can be used in almost any part of an application. See the chapter on Active Elements for more information on that.
Integration with existing systems often requires the implementation of technical interfaces, ranging from simple plain-text resources to sophisticated reports. Structr provides Virtual Types for input / output mapping of its data model to other models. See also Creating non-HTML output and Server APIs.
Let’s have a look at the files of a Structr installation. The following screenshot shows the directory contents of the Structr runtime directory after Structr has been started.