define-application-modules
Installation
SKILL.md
Defining ABP Modules
Every ABP application and reusable module is defined by a module class that derives from AbpModule (namespace Volo.Abp.Modularity). The module class is where you declare dependencies, register services, configure options, and run startup/shutdown logic. ABP builds the dependency graph from the root module and initializes/shuts down all modules in the correct order.
When to Use
- Creating an
AbpModuleclass for an application or reusable module. - Declaring dependencies on other modules with
[DependsOn]. - Registering services in
ConfigureServices(orPre/PostConfigureServices). - Configuring options with
Configure<TOptions>and its Pre/Post variants. - Adding startup/shutdown lifecycle hooks.
- Wiring up conventional DI via
ITransientDependency/IScopedDependency/ISingletonDependency.
When Not to Use
- Deciding which project/layer a class belongs in — use the layered-architecture skill.
- Modeling entities, aggregate roots, value objects, or domain services — use the model-domain-aggregates skill.
- Loading modules at runtime as plug-ins (
PlugInSources) — use the create-plugin-modules skill. - Writing application service implementations — use the application-services skill.