mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-02-13 13:43:26 +03:00
3.3 KiB
3.3 KiB
Federation Architecture Principles
While implementing federation in forgejo we introduced some conncepts from DomainDrivenDesign:
- Aggregate: Aggregates are clusters of objects (entities or values) which are handled atomic when it comes to persistence.
- Validation: Every object should express it's own validity, whenever someone is interested in
- we collect as many invalidity information as possible in one shoot - so we return a list of validation issues if there are some.
- Objects entering the lifetime are checked for validity on the borders (after loaded from and before stored to DB, after being newly created (New* functions) or after loaded via web / REST).
Objects in forgefed package reflect Objects from ap or f3 lib but add some Forgejo specific enhancements like more specific validation.