Skip to content
项目

关于

一个使用 Rust 编写的领域驱动设计示例应用。

其他项目

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Rust Domain Driven Design Example

The purpose of this project is to write a simple application in Rust (2021 edition) that follows basic Domain Driven Design principles, in order to test the capabilities of the language to write applications that follow DDD.

Running the project

Clone the repository, and run in the root of the project:

cargo run

A menu will appear that will guide you through the application.

Structure

The source code is explicitly split into four of the typical DDD layers:

  • Domain - Where the business rules of the application reside.
  • Application - The layer that orchestrates Domain and Infrastructure, and contains the use cases for your application.
  • Infrastructure - Contains implementations of the abstractions defined in the Domain and Application layer, and other infrastructure details.
  • Presentation - Defines how to present the data and defined the basic controller actions. Normally, this layer is often considered "Infrastructure", and some people prefer to separate it, whereas some people don't.

main.rs contains the initializations of the infrastructure implementations.

The code also contains unit testing.

Contribution

Please, feel free to contribute asking, discussing, commenting or improving the application via Pull Requests or Issues. All type of feedback will be welcomed!

Resources

探索相关项目

加载中…