Thanks a bunch for this awesome project—it's exactly what I've been searching for!
I'm pretty new to clean architecture and DDD, and I've got a couple of questions about keeping things consistent with input rules, like checking for not null or empty and setting maximum lengths. I'd love to hear your thoughts.
The not null/empty rules are in the Domain layer, but they're also duplicated in the Application layer. So, when I need to change the rules, I have to make updates in two places. There's a risk that a developer might forget to update one of them. Any best practices for solving this?
The max length rules are in the Application layer. Should I also have the same rules in the Domain layer? If not, why do we have not empty rules in both layers? If yes, it brings me back to my first question.
Hi Milan,
Thanks a bunch for this awesome project—it's exactly what I've been searching for!
I'm pretty new to clean architecture and DDD, and I've got a couple of questions about keeping things consistent with input rules, like checking for not null or empty and setting maximum lengths. I'd love to hear your thoughts.
The not null/empty rules are in the Domain layer, but they're also duplicated in the Application layer. So, when I need to change the rules, I have to make updates in two places. There's a risk that a developer might forget to update one of them. Any best practices for solving this?
The max length rules are in the Application layer. Should I also have the same rules in the Domain layer? If not, why do we have not empty rules in both layers? If yes, it brings me back to my first question.
Looking forward to your insights.
Best regards.