Timeline for How to use external validation libraries for entities in a "clean" architecture?
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 14, 2021 at 11:34 | comment | added | amon | @dendog Your code isn't violating the Dependency Rule. Your entities just use a library to define validation rules instead of doing everything manually (see also this related question). Also, in general, I'd suggest not following Robert C Martin's recommendations too closely. He's prone to hyperbole and has limited experience with long-term software maintenance. His ideas often point you in the right direction but it's easy to accidentally take them too far. | |
Dec 14, 2021 at 9:44 | comment | added | dendog | Ok well your answer is very high level, it makes sense but does not give any insight into actual implementation. My code breaks the clean rules, as I import a lib into the entity. | |
Dec 13, 2021 at 15:11 | comment | added | amon | @dendog Example of what? Your code example seems fine. | |
Dec 13, 2021 at 9:13 | comment | added | dendog | Thanks, would you mind providing a more concrete example? | |
Dec 12, 2021 at 16:35 | history | answered | amon | CC BY-SA 4.0 |