当前位置:网站首页>ABP framework
ABP framework
2022-06-26 03:44:00 【yuyue5945】
ABP Framework Basics
ABP Is an open source and document friendly application framework .ABP It's not just a framework , It also provides a practical Domain Driven Design (DDD) The architecture model of , Can support .net framework and .net core Two technical schools .
ABP Frame features
- Dependency injection , This part uses Castle windsor ( Dependency injection container ) To implement dependency injection , This is also what we often use IOC To deal with the way ;
- Repository Storage mode , Has been realized. Entity Framework、NHibernate、MangoDB、 Memory database, etc , The storage mode can realize the call of data interface quickly ;
- Authentication and authorization management , You can use the declaration feature to log in to the user or not , Or verify the permission of the interface , In a very fine-grained way , Set the call permission of each interface ;
- Data validation ,ABP Automatically judge the input parameter object of the interface , And the validity of the attribute can be verified according to the application information of the attribute ;
- Audit logs , That is to record our call records for each interface , And the creation of records 、 modify 、 Delete personnel for records and other processing ;
- Unit Of Work Work unit mode , Automatically implement database transactions for application layer and storage layer methods , Default interface of all application service layers , They all work in units of work , Even if they call different storage objects to handle , They are all in the logic of a transaction ;
- exception handling ,ABP The framework provides a complete set of process processing operations , It is very convenient to record and pass exceptions ;
- logging , We can use Log4Net Do regular logging , It's convenient for us to track the program processing information and error information ;
- Multilingual / Localization support ,ABP The framework is also friendly to multi language processing , Provide for the right to XML、JSON Language information configuration processing ;
- Auto Mapping Automatic mapping , This is ABP An important concept of object isolation , By using AutoMaper To implement domain objects and DTO Property mapping of objects , Can isolate the logical relationship between the two , But it can easily realize the assignment of attribute information ;
- dynamic Web API layer , Take advantage of this dynamic processing , You can put Application Service Direct release as Web API layer , There is no need to manually create one for each business object Web API The controller , Very convenient ;
- dynamic JavaScript Of AJax Agent processing , Can automatically create Javascript The agent layer is more convenient to use Web Api, This is in Web Layer using .
ABP Special features of the framework
- Multi tenant support ( Each tenant's data is automatically isolated , Business module developers do not need to write code when saving and querying data ;
- Soft delete support ( Inherit the corresponding base class or implement the corresponding interface , Soft deletion will be realized automatically )
- System settings access management ( The system level 、 Tenant level 、 User level , Scope of action automatic management )
- EventBus Implement domain events (Domain Events)
- Modules and module dependencies to achieve plug-in module processing and so on
ABP Framework hierarchical architecture diagram

The idea of separation between the front and the back , Not only can it be applied to Web Of B/S Development , Apply to both C/S Development
- front end Web The end can use Ant-Design(React)、IView(VUE)、Angular And so on different front-end technology to carry the interface presentation layer
- front end Client The desktop side can use MaterialDesign design code , according to Prism perhaps MVMMLight Of MVMVM Framework combined with application
WEB API Priority Architecture
ABP The core of the framework is mainly .NET The back-end technology stack is the main line , although ASP.NET CORE MVC and Web API It's divided into two parts , But his dynamic release is Web API Limited architecture provides better convenience .
In today's popular presentation layer , More and more independent of the back-end technology implementation , And focus on Web API Standardized docking , be based on JSON Interactive processing of data . No matter what it is Ant-Design(React)、IView(VUE)、Angular And so on Web front end , We can see that these architectures are easy to implement Web API Standard interface docking , In my earlier offer of Winform Inside the hybrid frame , Also with Web API Priority strategy for Cloud Application Deployment
ABP The project structure of the framework
ABP The framework consists of two parts , A basic ABP frame , One ABP Extended applications based on the basic framework . It provides personnel 、 role 、 jurisdiction 、 conversation 、 Authentication 、 multi-tenancy 、 Logging and so on , We generally mean ABP Framework application is to expand its business project on this basis . This part , We can configure certain options according to the official website , Then download and use .
Infrastructure components
| Package | Status |
|---|---|
| Abp NuGet | version |
| Abp.AspNetCore | NuGet version |
| Abp.Web.Common | NuGet version |
| Abp.Web NuGet | version |
| Abp.Web.Mvc NuGet | version |
| Abp.Web.Api NuGet | version |
| Abp.Web.Api.OData | NuGet version |
| Abp.Web.Resources | NuGet version |
| Abp.Web.SignalR | NuGet version |
| Abp.Owin | NuGet version |
| Abp.EntityFramework.Common | NuGet version |
| Abp.EntityFramework | NuGet version |
| Abp.EntityFramework.GraphDiff | NuGet version |
| Abp.EntityFrameworkCore | NuGet version |
| Abp.NHibernate | NuGet version |
| Abp.Dapper | NuGet version |
| Abp.FluentMigrator | NuGet version |
| Abp.AspNetCore | NuGet version |
| Abp.AspNetCore.SignalR | NuGet version |
| Abp.AutoMapper | NuGet version |
| Abp.HangFire | NuGet version |
| Abp.HangFire.AspNetCore | NuGet version |
| Abp.Castle.Log4Net | NuGet version |
| Abp.RedisCache | NuGet version |
| Abp.RedisCache.ProtoBuf | NuGet version |
| Abp.MailKit | NuGet version |
| Abp.Quartz | NuGet version |
| Abp.TestBase | NuGet version |
| Abp.AspNetCore.TestBase | NuGet version |
The template style of extension application is as follows , You need to download it from the official website

download .net core After the project , The project view of the back-end part is as follows

We can see from this project , It is mainly divided into the following several project layers .
Application application layer : The application layer provides some application services (Application Services) Method is called by the presentation layer . An application service method receives a DTO( Data transmission object ) As input parameter , Use this input parameter to perform specific domain level operations , And return to another... As needed DTO.
Core Domain core layer , The domain layer is the business layer , Is the core of a project , All business rules should be implemented at the domain level . In this project , In addition to defining the required domain entity classes , In fact, we can define our own custom warehousing objects ( similar DAL/IDAL), And define your own business logic layer ( similar BLL/IBLL), And based on AutoMapper Mapping rules and so on .
EntityFrameworkCore The core layer of Entity Framework , This project doesn't need to change much , Only need DbContext The storage object of the corresponding domain object can be added .
Migrator Data migration layer , This is a console program project created by assistant , If based on DB First, We can use it to create our project's initialization database .
Web.Core Web Core layer , be based on Web perhaps Web API The core layer of , Provides the basic processing of authentication login , Nothing else .
Web.Core.Host Web API The host layer of , It's also a dynamic release Web API The core content , In addition to Web API It's integrated Swagger, Make it convenient for us to Web API Debug the interface of .
Tests Unit test layer , This provides some simulation tests of application layer objects , The database tested uses Entity Framework Memory database of , Does not affect the actual database content .
eb API Debug the interface of .
- Tests Unit test layer , This provides some simulation tests of application layer objects , The database tested uses Entity Framework Memory database of , Does not affect the actual database content .
边栏推荐
- mysql存储过程
- Qt 中 deleteLater 使用总结
- Group counting notes - instruction pipeline of CPU
- The kotlin project is running normally and the R file cannot be found
- The "eye" of industrial robot -- machine vision
- Insect structure and Deconstruction
- Android gap animation translate, scale, alpha, rotate
- 2022.6.20-----leetcode. seven hundred and fifteen
- Deletelater Usage Summary in QT
- "Renegotiation" agreement
猜你喜欢

Classic model alexnet

Click event

Mysql database foundation
![[paper notes] supersizing self supervision: learning to grasp from 50K tries and 700 robot hours](/img/fe/f8208747e03133f4a66e73598409d5.png)
[paper notes] supersizing self supervision: learning to grasp from 50K tries and 700 robot hours

progress bar

【哈希表】改进,拉链法哈希结构——直接用两个索引查找,不用每次都hash和%一遍

The kotlin project is running normally and the R file cannot be found

解决uniapp插件robin-editor设置字体颜色和背景颜色报错的问题

Uni app swiper rotation chart (full screen / card)

String到底能不能改变?
随机推荐
navicat16无线试用
Graphics card, GPU, CPU, CUDA, video memory, rtx/gtx and viewing mode
mysql存儲過程
Some mobile phones open USB debugging, and the solution to installation failure
栖霞消防开展在建工地消防安全培训
Evaluation - analytic hierarchy process
MySQL development environment
计组笔记——CPU的指令流水
String到底能不能改变?
Uni app custom navigation bar component
General operations of asynctask
2022.6.24-----leetcode.515
USB peripheral driver - Enumeration
Nebula Graph学习篇3_多线程完成6000w+关系数据迁移
解决uniapp插件robin-editor设置字体颜色和背景颜色报错的问题
Qixia fire department carries out fire safety training on construction site
点击事件
Classic model – RESNET
USB驱动-debug
2022.6.20-----leetcode. seven hundred and fifteen