跳转至

Functions on objects (FOO)(面向对象函数(Functions on objects, FOO))

Functions on objects (FOO) enables code authors to write business logic on object data and leverage this logic downstream in operational applications. Functions on objects includes support for reading properties of various object types, flexibly aggregating or editing that data, and traversing links defined in the Ontology.

Within a Workshop module, functions on objects can be used in a variety of ways, including:

  • To compute and display metrics: Widgets such as Metric Cards can display numerical or categorical values dynamically computed by functions to help guide users’ decisions.
  • To define complex object sets: Complex object sets used to load object data in a Workshop module can be defined by a function.
  • Via Function-backed Actions: Complex Actions can be defined using a function. Function-backed Actions enable modules to trigger complex sets of object edits and writeback.

Learn more about how to define and use functions.

Learn more about functions on objects.


中文翻译


面向对象函数(Functions on objects, FOO)

面向对象函数(Functions on objects, FOO) 支持代码开发者基于对象数据编写业务逻辑,并可在下游运营应用中复用这些逻辑。面向对象函数的能力包括读取各类对象类型的属性、灵活聚合或编辑数据,以及遍历本体论(Ontology)中定义的链接。

在Workshop模块中,面向对象函数的使用场景十分丰富,包括:

  • 计算并展示指标: 指标卡片(Metric Cards)等组件可展示由函数动态计算的数值或分类值,辅助用户做出决策。
  • 定义复杂对象集(object set): 用于在Workshop模块中加载对象数据的复杂对象集可通过函数定义。
  • 通过函数支撑操作(Function-backed Action)使用: 复杂操作(Action)可通过函数进行定义。函数支撑操作支持模块触发一系列复杂的对象编辑与回写(writeback)操作。

了解如何定义和使用函数。

了解更多面向对象函数相关内容。