29 Star 185 Fork 80

Pear Admin/Pear Admin Abp

Create your Gitee Account
Explore and code with more than 12 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
MIT

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上下文中的服务,以此来避免直接耦合。 输入图片说明

The MIT License (MIT) Copyright (c) 2016 ASP.NET Boilerplate Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
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

Dd8185d8 1850385 E526c682 1850385