Distinguish Business Central application layers and modules

Completed

Before you extend or evaluate an app, you need to know which layer of the Business Central application it touches and which modules it depends on. This information changes how you scope your changes and which risks you accept.

Identify the application layers

The Business Central application separates runtime services, reusable system capabilities, standard business logic, and extensions. This separation gives each component a clear responsibility and limits the directions in which dependencies can flow.

  • The platform provides the runtime, the AL compiler, and core services such as the client, web services, and background sessions. You don't modify the platform. You build on top of it.
  • The System Application is a set of open-source modules that provide reusable building blocks, such as string manipulation, email, and notifications. System Application modules wrap unsafe or low-level operations behind safe, public facades, so higher layers don't need direct access to those operations.
  • The Base Application contains the business logic for standard Business Central functionality, such as sales, purchasing, and inventory. It consumes services from lower layers.
  • Other modules and extensions add capabilities without changing the platform or standard application code. An extension can depend on Microsoft applications and other extensions that expose the APIs it needs.

Each layer can only take a dependency on its own layer or on a lower layer. For example, a module in the Core Application can depend on another Core Application module or a System Application module, but it can't depend on an extension. A higher-level application object can call a System Application facade, but the System Application must not call back into that higher layer.

Consider a customization that calculates a delivery date. If the calculation only needs calendar functions exposed by a System Application module, the dependency points down the stack. If the system module calls a custom sales table to finish the calculation, the lower layer now depends on a higher layer. This upward dependency makes the module difficult to reuse and creates a cycle when the sales extension also calls the system module.

The layer name alone doesn't determine whether a dependency is acceptable. You also need to identify the object that provides the capability, the app that owns that object, and the public interface through which the caller reaches it. This evidence helps you separate a valid dependency from an accidental reference to implementation code.

Trace dependency direction in an app's manifest

An AL project's app.json manifest records its identity and target application. The application property identifies the minimum Business Central application version that the extension targets. The dependencies array identifies other apps that the extension requires by app ID, name, publisher, and version.

Read these properties together. The application property establishes the standard application baseline. Each entry in dependencies establishes an additional app that must be resolved before the extension can be installed. The version in a dependency entry identifies the minimum compatible version. It isn't an open-ended version range.

Use the manifest to determine:

  • Which system modules or Base Application objects the app depends on.
  • Whether the app requires another first-party or partner app.
  • Whether each dependency is available for every country or region that the app targets.
  • Whether the declared minimum versions are compatible with the target environment.

You can inspect the manifest directly in the AL project, or use the Extension Management page in Business Central to review the dependencies of apps that are already installed.

The presence of a dependency doesn't determine the app's type by itself. An add-on app can have dependencies, and a library app exists specifically to supply shared code. First classify the app by the experience and functionality it provides. Then use its manifest to understand the installation chain and coupling.

When you review a dependency chain, work from the app toward its lowest dependency:

  1. Identify the app that owns each referenced object.
  2. Confirm that the dependency appears in app.json.
  3. Confirm that the dependency points to the same layer or a lower layer.
  4. Check whether two apps reference each other directly or indirectly.
  5. Verify that each required app and minimum version exist in the target environment.

A missing dependency can prevent compilation or installation. A circular dependency indicates a design problem that you must remove by changing the boundary, moving shared contracts into a lower-level app, or using events to reverse control without reversing the package dependency.

Recognize module boundaries and public APIs

Inside the System Application, each module is packaged as an independent project with its own app.json file and a single public facade codeunit. Only the facade, and any pages, tables, or other objects marked with Access = Public, form the module's public API. Implementation details are marked Access = Internal, so other modules can't reference them directly.

When you evaluate an app, look for the same discipline. Does the app expose a small, documented interface, or does it expose internal tables and codeunits that other apps could take an unintended dependency on? An app that keeps its internal objects internal is easier to upgrade later, because you can change the implementation without breaking apps that depend on it.

Use the same questions when you assess a partner extension:

  • Does each public object support a documented consumer scenario?
  • Do public procedures expose business operations rather than internal implementation steps?
  • Are implementation codeunits and fields marked Internal when other apps don't need them?
  • Do event publishers provide extension points without exposing mutable internal state?
  • Can the app change its implementation without forcing dependent apps to change?

These questions turn an object inventory into an architectural assessment. A long list of public objects isn't automatically a defect, but it increases the compatibility surface that the publisher must maintain. A small, intentional API reduces that obligation.

For example, an app might expose a public facade procedure named CalculateShipmentDate and keep its calendar lookup and validation codeunits internal. Dependent apps call one documented operation. The publisher can then reorganize the internal calculation without breaking those callers. If dependent apps call the lookup codeunit directly, that codeunit becomes part of the effective contract even if the publisher didn't intend it.

Record an application-boundary decision

Summarize your analysis in a dependency map. For each app or module, record its layer, responsibility, public API, direct dependencies, and minimum versions. Then state whether the dependency direction is valid.

If you find a violation, recommend a boundary change rather than only removing the reference. Depending on the scenario, you might:

  • Move a shared contract to a module in a lower layer.
  • Call a documented public facade instead of an internal object.
  • Publish an event in the lower layer and subscribe to it in the higher layer.
  • Separate shared code into a library app with a stable public API.

The result is an actionable architecture decision. It identifies what the app owns, which contracts it consumes, and which dependency changes are required before development or distribution continues.

Tip

If you're unsure which layer an object belongs to, check the System and Base Application reference for the object's containing app.