Curly Braces

@loopinglife.bsky.social

Daily nuggets of software wisdom.

Developing software has friction, like machines do. Not enough information to do the right thing. Not enough resources to execute in the right way. And external factors influence fhe final outcome. So plan, design, and code for as far as you can see, but no further.

If you have "report generating jobs" in the back-end that provide no business logic (i.e. are only for front-end consumption), have the front-end send all (or most) of the data for the generation. Don't introduce new dependencies for this.

If a bounded context needs information from another bounded context to do an operation, ask yourself: - Am I missing a concept in this context? - Should I sync it locally (through events), or fetch it everytime? - Do I have the right model?

Separate front-end queries in a bounded context of their own. Their logic has nothing in common with the back-end's business logic. Often it's even conflicting. This is your start towards CQRS.

Don't use the generic "Dto" postfix when naming your DTOs. Use: Request, Details, Configuration, Payload, Result, Specification, Item, Summary, ...or whatever this DTO actually represents.