3 ms·
> Often, imo, this depends on where you want to put the validation complexity. You can move validation to the front end This has nothing to do with the fronten
by mrkeen 2y ago
> Often, imo, this depends on where you want to put the validation complexity. You can move validation to the front end
This has nothing to do with the frontend/backend split since a server will receive arbitrary requests, not just the ones you hope you programmed the frontend to send.
> In theory it sounds great to say "just prevent construction of bad states," but this is a complex problem in professional software
Defeatism.
If you have a User in your domain, and your domain dictates that Users have a UserId, simply do not allow construction of a User without a UserId. What's a UserId? Is it a String, or is it a UUID? If you think the King James Bible translated into Chinese makes for a good UserId, then a String is a perfectly good representation for that. Otherwise pick something more suitable.
- Benjammer 2y agoI mean I was just trying to have a conversation you don't have to try and roast me with quote-quips and absurdist comparisons... What is happening to this platform these days?
- mrkeen 2y agoI grounded it. Any problem can be swept away with "you don't know what you're talking about", "you'll come around to my way of thinking when you're older", "X has nothing to do with Y", etc. So, make things real with an example.