3 ms·
This is what happens when you view your application as an abstract Platonic object, immortal and perfect, outside any actual concrete implementation. Making the
by henning 4y ago
This is what happens when you view your application as an abstract Platonic object, immortal and perfect, outside any actual concrete implementation. Making the app serve web requests is part of the problem to be solved. The problem is the problem. Looking up whether a user exists as part of handling a request is completely fine because that's the simplest way to make the app do what it needs to do.
If you have some stupid "clean architecture" layer bullshit where your own application doesn't know how any of the rest of it works and everything is absurdly decoupled via some hexagonal bullshit, you're going to get into shitty situations where e.g. you have to call the database repository to do N queries rather than just one because the "clean domain layer" is written that way and the "HTTP message delivery layer" is only an "implementation detail" that has nothing to do with the pure business domain. Then your product will fucking suck fucking shit and you haven't actually solved the problem.