The Foundry Functions panel allows Slate to execute business logic written in a Functions repository as a "backend" service. In this paradigm, consider the Slate application the client, the Foundry Functions implementation the server, and the Ontology the database of a traditional web application infrastructure. Consult the documentation for more information on how to get started with Foundry Functions or how to use Functions on Objects.
The Foundry Functions panel lets you:
{{ff_foundry_function1}}
.The Function will need to be created in the Function Repository before being used in Slate.
When writing Functions to use in a Slate application, you should consider two approaches that differ based on where the application logic is implemented.
Radius
for a Scatterplot chart, is done in the Slate app in a regular JavaScript function.Using Foundry Functions to organize and manage the logic layer of a complex Slate application has significant benefits, such as:
Foundry Functions supports a wide range of standard, ontology-generated, and custom input and output types as documented in Functions Input and Output Types.
In a thick Functions approach, it's common to define custom input and output types so that data is returned in exactly the format necessary to populate specific charts or populate HTML widgets.