Apps#
An app is the most general-purpose extension class in SAMSON.
Use an app when your feature should appear as a tool or command in the UI, open its own window, run a workflow, connect to external software or services, or expose reusable functionality that is not naturally an editor, importer, exporter, or model.
Apps are listed in Home > Apps. When a user opens an app, its GUI appears and the app logic becomes available.

Mental model#
Think of an app as a pair of cooperating classes:
The SBDApp class owns the app logic and is the part you expose through introspection. The SBGApp class is the user-facing window or widget layer.
This split is useful because it keeps the functional API separate from the interface. That makes the app easier to script, reuse, test, and maintain.
When an app is the right choice#
Choose an app when your feature is primarily:
- a command or batch workflow
- a panel with controls and actions
- a bridge to an external executable, service, or dataset
- a reusable service object exposed to other extensions
Typical examples:
- docking or simulation launchers
- format conversion or analysis tools
- project utilities
- marketplace or network-connected integrations
When an app is not the right choice#
Do not default to an app if another extension type is a better fit:
- use an editor for direct viewport interaction
- use an importer or exporter for file formats
- use models or simulators when the feature becomes part of the scientific runtime state
Common implementation pattern#
Many apps follow this structure:
- derive a class from
SBDApp - expose the main actions or data through introspection
- derive a GUI class from
SBGApp - connect GUI controls to the app logic
- read or modify the data graph as needed
That pattern works well because it keeps business logic out of widget code.
A realistic example#
Suppose you want to build a tool that sends selected atoms to an external optimization service:
- the app gathers parameters and orchestrates the workflow
- the GUI lets the user choose options and launch the job
- the app reads the current selection from the data graph
- after the remote job finishes, the app updates or creates nodes with the result
That is an app problem, not an editor problem, because the main interaction is command-oriented rather than direct viewport manipulation.
What to read next#
- Use Extension Generator to scaffold a new app.
- Read Developing GUI for the widget side of app development.
- Read Tutorials for worked examples.