Workspaces

Between sessions, Finsemble will save and relaunch with all windows with the same position. Components that are logically integrated are reloaded with the same content. End users can save multiple workspace layouts and easily switch between groups of applications for different tasks.

In other words, a workspace is simply a collection of windows that persist between sessions.

What types of windows live in the workspace?

The easiest way to understand what is and isn't stored in the workspace is to ask yourself this question: "Does the component need to exist across multiple workspaces?" If the answer is "Yes," then it is not stored in the workspace. Menus, toolbars, dialogs, and chat windows are not stored in the workspace.

In the diagram below, the red components are application-level components. They're workspace independent. The blue components are part of the workspace and will restore at the proper place when a new session is started. Workspace

Why is there a distinction between window and component?

We only allow one component per window. Despite the one to one relationship, windows have very different concerns from components. The window shouldn't concern itself with the symbol on the chart, and the chart shouldn't concern itself with where it is placed on the screen. The disctinction speeds up debugging—you don't need to look in the component to figure out an issue with the window's state.


Set default workspaces

You define default workspaces by adding them to the config. By default in Finsemble seed, they are defined by finsemble-seed/configs/application/workspaces.json.

Workspaces defined by the config are persistent. If an end user deletes them locally, they will be recreated from the config the next time Finsemble restarts.

To add workspaces to your config:

  • Create the desired workspace in Finsemble.
  • Export the workspace.
    • You can export the workspace using the Preferences menu. The Workspaces section contains tools allowing an end user to export a workspace configuration.
    • You can also export the workspace using the Workspace Client: WorkspaceClient.export.
  • Add the exported workspace's configuration to finsemble-seed/configs/application/workspaces.json under "workspaces" as an array.

For example, each object in the array below represents a workspace:

"workspaces" : [
	{ … },
	{ … }
]

Workspace timeout

Workspaces are locked until a load action completes or the workspace load times out. While locked, the end user cannot interact with windows and a throbber control indicates that a workspace is loading.

If the workspace load times out, Finsemble will continue to load components in the background. Because the workspace becomes unlocked after timing out, end users might not realize that the workspace is still loading. If you anticipate your end users having large or resource-heavy workspaces, be judicious by setting a larger-than-default workspace timeout config.

The timeout is configured by two configuration settings: either servicesConfig.workspace.loadWorkspaceTimeout or services.workspaceService.loadWorkspaceTimeout. The value of the config is the time in seconds before the workspace load times out and the workspace becomes unlocked. By default, this value is 3000 seconds.


Active workspace

The current workspace that is open is called the active workspace. The active workspace is actually a copy of the stored workspace. For example, if "Workspace 1" is open, the active workspace is a copy of "Workspace 1."

If you make changes to the active workspace, those changes are not made to Workspace 1 until you save the changes.

The active workspace is stored by the Storage Client using the topic "finsemble.workspace.cache". We recommend not using remote storage for this data because the active workspace is constantly being written. Every change an end user makes to window position, a component's saved state, groups formed and disbanded, etc., constantly update the active workspace. A remote store will degrade performance and use bandwidth.

When saved, all workspaces are stored by the Storage Client using the "finsemble.workspace" topic.

The Config Reference details the topics of the Storage Client and lists their default values.


check   A workspace is a collection of windows whose state and position persist between sessions.
 

Further reading

For more information, check out the Workspace API Documentation.

Understanding how the Finsemble application handles start-up will provide additional context. The Build Process tutorial can be found here.

To learn how components link and share data, proceed on to Linking.