Welcome
Introduction to Stof.
Stof is the future of data representation and utilization. It unifies and organizes data in layers, providing a simple, efficient, and portable interface into a complex and dynamic environment.
One of the data layers a Stof document can contain is a functional one (code as data & data as code), enabling Stof to manipulate itself as it moves and changes. Shifting logic from the application layer into the data layer improves scalability and security while standardizing data handling. It also provides new methods to tackle pressing challenges like data governance, security, and interoperability.
Designed to work seamlessly with other data formats and standards, Stof adds value to every toolchain, either as a drop-in replacement or as a compliment to existing tools and formats.
Some of the many challenges we are addressing include:
Moving lightweight logic (as data) over the wire instead of large, sensitive data payloads.
Unification and translation of data between systems, aiding orchestration and federation.
Governance, security, and access control.
Structuring, typing, and schematizing.
Portable, dynamic, and reusable interfaces (functions, transformations, and business logic).
Multiple, layered interfaces (code, fields, metadata, meta code, etc. combined).
Bridging gaps between toolchains and environments.
By addressing these challenges, Stof can help lower development costs, drastically improve developer experience, and lay a better foundation for modern software.
Stof is a new open-source project in active development. There's a lot to do! If you have ideas, use cases, or are passionate about these areas of exploration, please contact us and get involved. The best way you can support us is by sponsoring this project.
Hello, World!
In its most basic form, Stof is just a more friendly JSON document. To begin understanding Stof, it might help to think of it as a JSON document that is turned into a program.
For declaring data, Stof is a superset of JSON - valid JSON will always be valid Stof.
This example is meant to show the connection to JSON, and the simplicity of Stof.
However, we can rewrite this to an equivalent version that looks much nicer. The #[main] attribute tells Stof which functions to call when we run this document.
See Run for more information on the Stof CLI. We'll use the CLI for examples instead of embedding Stof in host languages to keep examples centered on Stof.
Example
For "height", the value is 185.42 because we told Stof the type of that field is "cm", which casts "6ft + 1in" to centimeters. Types are not required for field declarations, but can always be provided. See Units for more information on units in Stof.
Last updated
Was this helpful?