topic hubAL Developmentofficial - Microsoftreviewed - checked by Opus

Creating new modules

Creating new modules covers how to build, change, and contribute AL modules in the Business Central System Application. It answers questions about environment setup, module architecture rules, facade and implementation codeunits, .NET wrapper modules, tests, and the Git workflow.

Path: Development > System and application reference documentation > Creating new modules · tier official · system development · narrative reviewed (checked by Opus)

Overview

This section is for developers who want to contribute modules to the System Application in the BCApps repository. It explains the design rules for modules, how to prepare a local development environment, and how to create or change a module.

Start with “Get started with modules” for the requirements (AL development, Git, environment setup). Then follow “Set up an environment for developing a module”, which uses GitHub, Docker, BcContainerHelper, and Visual Studio Code. “Module Architecture” gives the design principles you need before writing code: independent projects, public facades, dependency layers, and access modifiers.

Next, choose the task page. “Create a new module in the System Application” walks through facade and implementation codeunits, tests, and contribution guidelines. “Change a module in the System Application” covers modifying existing modules without breaking changes. “Create a .NET Wrapper Module” shows how to expose .NET functionality in AL, using the Regex module as an example.

Key points

  • Modules are developed in the BCApps repository using a Git workflow.
  • Environment setup uses GitHub, Docker, BcContainerHelper, and Visual Studio Code.
  • Module architecture separates modules into independent projects with a public facade and internal implementation.
  • Architecture guidance covers dependencies across functional layers, object accessibility, access modifiers, and extensibility controls.
  • A new module needs a facade codeunit, an implementation codeunit, and unit tests.
  • Changes to existing modules must follow the architecture guidelines, avoid breaking changes, and include tests.
  • .NET wrapper modules use codeunits and temporary tables, the facade pattern, an argument-table pattern, and constructor handling.
  • The Regex module is the worked example for .NET wrapping.

Learn pages

Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.

What Learn documents here 6 Learn pages