Skip to content

Commit b981cc1

Browse files
dennisdoomenDennis DoomenCopilot
authored
Update AV1025 guideline (#351)
Split from #298. Co-authored-by: Dennis Doomen <dennis.doomen@greenchoice.nl> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 196974d commit b981cc1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

_rules/1025.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ severity: 1
66
---
77
In general, if you find a lot of data-only classes in your code base, you probably also have a few (static) classes with a lot of behavior (see [{{ site.default_rule_prefix }}1008](#{{ site.default_rule_prefix }}1008)). Use the principles of object-orientation explained in this section and move the logic close to the data it applies to.
88

9-
**Exception:** The only exceptions to this rule are classes that are used to transfer data over a communication channel, also called [Data Transfer Objects](http://martinfowler.com/eaaCatalog/dataTransferObject.html), or a class that wraps several parameters of a method.
9+
**Exception:** The only exceptions to this rule are classes that are used to transfer data over a communication channel, also called [Data Transfer Objects](http://martinfowler.com/eaaCatalog/dataTransferObject.html), or a class that wraps several parameters of a method. For DTOs, consider using an immutable `record` type instead of a class to make the intent explicit.

0 commit comments

Comments
 (0)