25 Star 156 Fork 67

Pear Admin / Pear Admin Abp

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

Pear Admin Abp

开 箱 即 用 的 .Net 快 速 开 发 平 台

预 览 | 官 网

Pear Admin Layui Version Jquery Version Layui Version

介绍

基于ABP框架封装一套MPA框架,使用Layui作为前端呈现,封装常用的功能。旨在设计快速入手,快速实践框架。

软件架构

基于Abp框架并接入Pear Admin前端框架,Pear Admin框架基于Layui封装,两者均开源免费。

项目结构

整体的解决方案结构划分如下,其中PearAdmin.AbpTemplate.Admin重命名了ABP默认提供的Web.Mvc项目,一是从结构上出发,看起来更显得从上至下的分层结构,二是从请求路径上一目了然。并额外增加了PearAdmin.AbpTemplate.Gateway,以此来增加防腐层,方便各限界上下文间不要直接请求,通过防腐层约束请求调用。

- PearAdmin.AbpTemplate
    -src
        - PearAdmin.AbpTemplate.Admin
        - PearAdmin.AbpTemplate.Application
        - PearAdmin.AbpTemplate.Core
        - PearAdmin.AbpTemplate.EntityFrameworkCore
        - PearAdmin.AbpTemplate.Gateway
    - test
        - PearAdmin.AbpTemplate.Admin.Tests
        - PearAdmin.AbpTemplate.Application.Tests
        - PearAdmin.AbpTemplate.Core.Tests
    - tool
        - PearAdmin.AbpTemplate.Migrator
        - PearAdmin.AbpTemplate.Shared

说明:Admin为UI层,Application和Core为应用层和领域层,EntityFrameworkCore和Gateway及ABP自身提供的辅助设施组合为基础设施层。

代码模型

从DDD的角度考虑,抛弃UI层,以应用层,领域层,基础设施层去出发,按照文件夹隔离出限界上下文边界,内部代码模型如下

- PearAdmin.AbpTemplate.Application
    - AContext
        - AAggregate
    - BContext
        - BAggregate
        - ...
- PearAdmin.AbpTemplate.Core
    - AContext
        - AAggregate
    - BContext
        - BAggregate
        - ...
- PearAdmin.AbpTemplate.EntityFrameworkCore
- PearAdmin.AbpTemplate.Gateway
    - AContext

防腐层的建立,约定在领域层建立防腐层接口,在基础设施层-网关中实现接口,网关层对Application层有项目依赖,方便实例化下游上下文所需要的上游上下文。为避免出现循环引用,上下文映射图中最好不要出现环。

- PearAdmin.AbpTemplate.Application
    - AContext
    - BContext
- PearAdmin.AbpTemplate.Core
    - AContext
        - ...
        - AntiCorruption
            - IBService
    - BContext
- PearAdmin.AbpTemplate.EntityFrameworkCore
- PearAdmin.AbpTemplate.Gateway
    - AContext
        - AntiConrruption
            - BService

如限界上下文A需要访问上下文B中信息或需要B上下文协作,则通过A建立的防腐层接口与实现访问B上下文中的服务,以此来避免直接耦合。 输入图片说明

About

🏆 基 于 Pear Admin 和 Abp 的 落 地 实 践 expand collapse
C# and 4 more languages
MIT
Cancel

Releases (2)

All

Contributors

All

Activities

Load More
can not load any more
C#
1
https://gitee.com/pear-admin/pear-admin-abp.git
git@gitee.com:pear-admin/pear-admin-abp.git
pear-admin
pear-admin-abp
Pear Admin Abp
master

Search

10d9f8b4 4838521 8bde8327 4838521