Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
funkygao
cp-ddd-framework
Repository navigation
Code
Issues
3
(3)
Pull requests
1
(1)
Discussions
Actions
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
cp-ddd-framework
/
dddplus-spec
/
src
/
main
/
java
/
io
/
github
/
dddplus
/
model
/
IDomainService.java
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
24 lines (23 loc) · 1.59 KB
master
Breadcrumbs
cp-ddd-framework
/
dddplus-spec
/
src
/
main
/
java
/
io
/
github
/
dddplus
/
model
/
IDomainService.java
Copy path
Top
File metadata and controls
Code
Blame
24 lines (23 loc) · 1.59 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
* Copyright DDDplus Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package io.github.dddplus.model;
/**
* 领域层服务.
* <p>
* <p>领域中的一些概念不太适合建模为对象,因为它们本质上就是一些操作,一些动作,而不是事物.</p>
* <p>{@link IDomainService}是实现上的一种妥协,不该成为设计的核心:在Entity/VO等无法满足时才用它,理想目标是0个{@link IDomainService}.</p>
* <p>{@link IDomainService}只负责业务规则,不负责业务流程,业务流程由{@link IApplicationService}负责.</p>
* <ul>职责上{@link IApplicationService} vs {@link IDomainService}
* <li>前者是横向层,协调/驱动不同的领域对象和领域服务,实现业务流程的调度和控制,处理与用户交互的请求,以及与领域模型之间的交互</li>
* <li>是面向用户和系统的外部接口,此外,还负责事务的管理、权限的控制、数据校验等</li>
* <li>后者是纵向层,负责聚合之间的协作和交互,实现领域模型中的业务逻辑,封装领域模型中复杂的业务流程和算法,实现领域模型的高内聚、低耦合和可复用性</li>
* <li>是面向领域模型的内部接口,负责对领域模型进行拓展、补充和优化</li>
* <li>横向做编排,纵向做隔离</li>
* <li>简单来说,前者负责应用程序的控制流程和与外部系统的交互,后者负责领域内的业务逻辑和领域模型的拓展和优化</li>
* </ul>
*/
public interface IDomainService {
}
You can’t perform that action at this time.