Browse Source

Added Application Modules document

pull/671/head
Halil ibrahim Kalkan 7 years ago
parent
commit
c8539e2a3c
  1. 33
      docs/en/Module-Development-Basics.md
  2. 9
      docs/en/Modules/Docs.md
  3. 26
      docs/en/Modules/Index.md
  4. 4
      docs/en/docs-nav.json

33
docs/en/Module-Development-Basics.md

@ -1,10 +1,10 @@
## Module Development
# Module Development
### Introduction
## Introduction
ABP is itself a modular framework. It also provides an infrastructure and architectural model to develop your own modules.
ABP is a **modular application framework** which consists of dozens of **nuget packages**. It also provides a complete infrastructure to build your own application modules which may have entities, services, database integration, APIs, UI components and so on.
### Module Class
## Module Class
Every module should define a module class. The simplest way of defining a module class is to create a class derived from ``AbpModule`` as shown below:
@ -16,9 +16,9 @@ public class BlogModule : AbpModule
````
#### Configuring Dependency Injection & Other Modules
### Configuring Dependency Injection & Other Modules
##### ConfigureServices Method
#### ConfigureServices Method
``ConfigureServices`` is the main method to add your services to the dependency injection system and configure other modules. Example:
@ -52,15 +52,15 @@ public class BlogModule : AbpModule
See Configuration (TODO: link) document for more about the configuration system.
##### Pre & Post Configure Services
#### Pre & Post Configure Services
``AbpModule`` class also defines ``PreConfigureServices`` and ``PostConfigureServices`` methods to override and write your code just before and just after ``ConfigureServices``. Notice that the code you have written into these methods will be executed before/after the ``ConfigureServices`` methods of all other modules.
#### Application Initialization
### Application Initialization
Once all the services of all modules are configured, the application starts by initializing all modules. In this phase, you can resolve services from ``IServiceProvider`` since it's ready and available.
##### OnApplicationInitialization Method
#### OnApplicationInitialization Method
You can override ``OnApplicationInitialization`` method to execute code while application is being started. Example:
@ -102,15 +102,15 @@ public class AppModule : AbpModule
You can also perform startup logic if your module requires it
##### Pre & Post Application Initialization
#### Pre & Post Application Initialization
``AbpModule`` class also defines ``OnPreApplicationInitialization`` and ``OnPostApplicationInitialization`` methods to override and write your code just before and just after ``OnApplicationInitialization``. Notice that the code you have written into these methods will be executed before/after the ``OnApplicationInitialization`` methods of all other modules.
#### Application Shutdown
### Application Shutdown
Lastly, you can override ``OnApplicationShutdown`` method if you want to execute some code while application is beign shutdown.
Lastly, you can override ``OnApplicationShutdown`` method if you want to execute some code while application is being shutdown.
### Module Dependencies
## Module Dependencies
In a modular application, it's not unusual for one module to depend upon another module(s). An Abp module must declare ``[DependsOn]`` attribute if it does have a dependcy upon another module, as shown below:
@ -126,3 +126,10 @@ public class BlogModule
You can use multiple ``DependsOn`` attribute or pass multiple module types to a single ``DependsOn`` attribute depending on your preference.
A depended module may depend on another module, but you only need to define your direct dependencies. ABP investigates the dependency graph for the application at startup and initializes/shutdowns modules in the correct order.
## Framework Modules vs Application Modules
There are **two types of modules.** They don't have any structural difference but categorized by functionality and purpose:
- **Framework modules**: These are **core modules of the framework** like caching, emailing, theming, security, serialization, validation, EF Core integration, MongoDB integration... etc. They do not have application/business functionalities but makes your daily development easier by providing common infrastructure, integration and abstractions.
- **Application modules**: These modules implement **specific application/business functionalities** like blogging, document management, identity management, tenant management... etc. They generally have their own entities, services, APIs and UI components. See [pre-built application modules](Modules/Index.md).

9
docs/en/Modules/Docs.md

@ -0,0 +1,9 @@
# Docs Module
Docs module is used to create technical documentation pages. ABP's [own documentation](https://abp.io/documents/) already using this module.
> Docs module follows the [module architecture best practices](../Best-Practices/Module-Architecture.md) guide.
## Installation
TODO...

26
docs/en/Modules/Index.md

@ -0,0 +1,26 @@
# Application Modules
ABP is a **modular application framework** which consists of dozens of **nuget packages**. It also provides a complete infrastructure to build your own application modules which may have entities, services, database integration, APIs, UI components and so on.
There are **two types of modules.** They don't have any structural difference but categorized by functionality and purpose:
* [**Framework modules**](https://github.com/abpframework/abp/tree/master/framework/src): These are **core modules of the framework** like caching, emailing, theming, security, serialization, validation, EF Core integration, MongoDB integration... etc. They do not have application/business functionalities but makes your daily development easier by providing common infrastructure, integration and abstractions.
* [**Application modules**](https://github.com/abpframework/abp/tree/master/modules): These modules implement specific application/business functionalities like blogging, document management, identity management, tenant management... etc. They generally have their own entities, services, APIs and UI components.
## Open Source Application Modules
There are some **free and open source** application modules developed and maintained by the ABP community:
* **Account**: Used to make user login/register to the application.
* **Audit Logging**: Used to persist audit logs to a database.
* **Background Jobs**: Used to persist background jobs when using default background job manager.
* **Blogging**: Used to create fancy blogs. ABP's [own blog](https://abp.io/blog/abp/) already using this module.
* [**Docs**](Docs.md): Used to create technical documentation pages. ABP's [own documentation](https://abp.io/documents/) already using this module.
* **Identity**: Used to manage roles, users and their permissions.
* **Identity Server**: Integrates to IdentityServer4.
* **Permission Management**: Used to persist permissions.
* **Setting Management**: Used to persist settings.
* **Tenant Management**: Used to manage tenants for a [multi-tenant](../Multi-Tenancy.md) application.
* **Users**: Used the abstract users, so other modules can depend on this instead of the Identity module.
Documenting the modules is in the progress. See [this repository](https://github.com/abpframework/abp/tree/master/modules) for source code of all modules.

4
docs/en/docs-nav.json

@ -246,6 +246,10 @@
}
]
},
{
"text": "Application Modules",
"path": "Modules/Index.md"
},
{
"text": "Testing"
},

Loading…
Cancel
Save