Skip to main content

Services Overview

Overview

Services are a beefier version of commands. They provide a set of operations, often tied to some shared state, and are made available to extensions via the ServicesManager. Services are particularly well suited to address cross-cutting concerns.

Each service should be:

  • self-contained
  • able to fail and/or be removed without breaking the application
  • completely interchangeable with another module implementing the same interface

Kinds of Services

Depending on the kind of service, we follow slightly different conventions. For example, a UI service often receives its implementation from a React Context Provider. You can read more about the different kinds of services and what makes them different below:

Services (default)

Services are a work in progress. As we are still in the progress of creating a non-ui maintained service, this usage may change.

You can read more about default services: here

UI Services

A typical web application will have components and state for common UI like modals, notifications, dialogs, etc. A UI service makes it possible to leverage these components from an extension.

We maintain the following UI Services:

You can read more about a specific service by selecting it in the above list, and more about UI services in general: here

Services are "concern-specific" code modules that can be consumed across layers. We try to minimize the coupling they introduce by authoring services that are able to fail or be removed. Related patterns that may reduce coupling include:

  • Pub/Sub
  • Commands