当前位置:网站首页>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 .
边栏推荐
- "Renegotiation" agreement
- Kotlin uses viewpager2+fragment+bottomnavigationview to implement the style of the switching module of the bottom menu bar.
- 2022.6.24-----leetcode.515
- Where is it safe to open a fund account?
- Classic model alexnet
- 2022.6.20-----leetcode. seven hundred and fifteen
- Xiaomi TV's web page and jewelry's web page
- Click event
- TiFlash 函数下推必知必会丨十分钟成为 TiFlash Contributor
- Request object, send request
猜你喜欢
【哈希表】很简单的拉链法哈希结构,以至于效果太差,冲突太多,链表太长
Uni app QR code scanning and identification function
MySQL高級篇第一章(linux下安裝MySQL)【下】
Qixia fire department carries out fire safety training on construction site
计组笔记——CPU的指令流水
[hash table] a very simple zipper hash structure, so that the effect is too poor, there are too many conflicts, and the linked list is too long
When the tiflash function is pushed down, it must be known that it will become a tiflash contributor in ten minutes
After Ali failed to start his job in the interview, he was roast by the interviewer in the circle of friends (plug)
Kotlin uses viewpager2+fragment+bottomnavigationview to implement the style of the switching module of the bottom menu bar.
MySQL开发环境
随机推荐
MySQL development environment
Cliquez sur le bouton action de la liste pour passer à une autre page de menu et activer le menu correspondant
View of MySQL
kitti2bag 安装出现的各种错误
【哈希表】很简单的拉链法哈希结构,以至于效果太差,冲突太多,链表太长
小程序或者for循序要不要加key?
Run multiple main functions in the clion project
Do you want to add a key to the applet or for sequence?
MySQL addition, deletion, query and modification (Advanced)
Is it safe for individuals to buy stocks with flush software? How to buy stocks
【哈希表】改进,拉链法哈希结构——直接用两个索引查找,不用每次都hash和%一遍
栖霞消防开展在建工地消防安全培训
评价——层次分析
MySQL高级部分( 四: 锁机制、SQL优化 )
jupyter notebook的插件安装以及快捷键
虫子 构造与析构
Plug in installation and shortcut keys of jupyter notebook
解决uniapp插件robin-editor设置字体颜色和背景颜色报错的问题
Click event
2022.6.20-----leetcode. seven hundred and fifteen