Web Analytics Made Easy - Statcounter
Skip to content

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.

App example

Mental model#

Think of an app as a pair of cooperating classes:

  1. a data-side app object derived from SBDApp
  2. an optional GUI object derived from SBGApp

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:

Common implementation pattern#

Many apps follow this structure:

  1. derive a class from SBDApp
  2. expose the main actions or data through introspection
  3. derive a GUI class from SBGApp
  4. connect GUI controls to the app logic
  5. 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.