百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

Architecture

> 前端框架
开源

.NET 10、Angular 21、整洁架构、整洁代码、SOLID、KISS、DRY、中介者模式、按功能划分的文件夹结构

3.3K stars0 点赞1 次浏览
访问官网GitHub

工具介绍

.NET 10、Angular 21、整洁架构、整洁代码、SOLID、KISS、DRY、中介者模式、按功能划分的文件夹结构

Architecture

Principles and Patterns

  • Clean Architecture
  • Clean Code
  • SOLID Principles
  • KISS Principle
  • DRY Principle
  • Mediator Pattern
  • Result Pattern
  • Folder-by-Feature Structure

Benefits

  • Simple and evolutionary architecture.
  • Standardized and centralized flow for validation, log, security, return, etc.
  • Avoid cyclical references.
  • Avoid unnecessary dependency injection.
  • Segregation by feature instead of technical type.
  • Single responsibility for each request and response.
  • Simplicity of unit testing.

Technologies

  • .NET
  • ASP.NET Core
  • Entity Framework Core
  • C#
  • Angular
  • UIkit

Packages

  • Source: https://github.com/rafaelfgx/DotNetCore

  • Published: https://www.nuget.org/profiles/rafaelfgx

Run

Command Line

Prerequisites

  • .NET SDK
  • SQL Server
  • Node
  • Angular CLI

Steps

  1. Open directory source\Web\Frontend in command line and execute npm run restore.
  2. Open directory source\Web in command line and execute dotnet run.
  3. Open https://localhost:8090.
Visual Studio Code

Prerequisites

  • .NET SDK
  • SQL Server
  • Node
  • Angular CLI
  • Visual Studio Code
  • C# Extension

Steps

  1. Open directory source\Web\Frontend in command line and execute npm run restore.
  2. Open source directory in Visual Studio Code.
  3. Press F5.
Visual Studio

Prerequisites

  • Visual Studio
  • Node
  • Angular CLI

Steps

  1. Open directory source\Web\Frontend in command line and execute npm run restore.
  2. Open source\Architecture.sln in Visual Studio.
  3. Set Architecture.Web as startup project.
  4. Press F5.
Docker

Prerequisites

  • Docker

Steps

  1. Execute docker compose up --detach --build --force-recreate --remove-orphans.
  2. Open http://localhost:8090.

Layers

  • Web: Frontend and Backend.

    • Frontend

      • Service: It is the interface between frontend and backend and has logic that does not belong in components.

      • Guard: It validates if a route can be activated.

      • ErrorHandler: It provides a hook for centralized exception handling.

      • HttpInterceptor: It intercepts and handles an HttpRequest or HttpResponse.

    • Backend

      • Controller: It has no any logic, business rules or dependencies other than mediator.
  • Application: Flow control. It has only business flow, not business rules.

    • Request: It has properties representing the request.

    • Request Validator: It has rules for validating the request.

    • Response: It has properties representing the response.

    • Handler: It is responsible for the business flow and processing a request to return a response. It call factories, repositories, unit of work, services or mediator, but it has no business rules.

    • Factory: It creates a complex object. Any change to object affects compile time rather than runtime.

  • Domain: Business rules and domain logic. It has no any references to any layer. It has aggregates, entities, value objects and services.

    • Aggregate: It defines a consistency boundary around one or more entities. The purpose is to model transactional invariants. One entity in an aggregate is the root, any other entities in the aggregate are children of the root.

    • Entity: It has unique identity. Identity may span multiple bounded contexts and may endure beyond the lifetime. Changing properties is only allowed through internal business methods in the entity, not through direct access to the properties.

    • Value Object: It has no identity and it is immutable. It is defined only by the values ​​of its properties. To update a value object, you must create a new instance to replace the old one. It can have methods that encapsulate domain logic, but these methods must have no side effects on the state.

    • Services: It performs domain operations and business rules. It is stateless and has no operations that are not a part of an entity or value object.

  • Model: Data transfer objects. It has properties to transport and return data.

  • Database: Data persistence.

    • Context: It configures the connection and represents the database.

    • Entity Configuration: It configures the entity and its properties in the database.

    • Repository: It inherits from the generic repository and only implements specific methods.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#angulararchitectureaspnet-coreaspnetcore

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架