Skip to content

ICommand and CommandBase - why duplicated in modules #137

Answered by AndreiGanichev
radian7 asked this question in Ideas
Discussion options

You must be logged in to vote

Hi, @radian7.
I suggests the reason is following. Two of the main attributes of modularity [1] are independence and well-defined interface. ICommand, IQuery are part of a module's interface and they shouldn't be shared to keep and emphasize module's independence.

Robert Martin [2] uses a term "accidental duplication" and I guess it's exactly what we have here: contracts looks like duplicates accidentally - they are independent actually.

  1. Kamil Grzybek. Modular Monolith: A Primer
  2. Robert Martin. Clean Architecture. Chapter 7. SRP.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@kgrzybek
Comment options

@AndreiGanichev
Comment options

Answer selected by radian7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants