Curly Braces
@loopinglife.bsky.social
📤 1530
📥 13032
📝 29
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.
about 2 months ago
0
6
2
Don't jump into using microservices. Let the problems drive that decision. In reality, most of us will rarely justify the use of microservices.
2 months ago
1
10
0
Din't wait to code until you have a good model. But when coding, do it in small, frequent batches, enabling ease of change.
2 months ago
0
4
0
Don't do too much in a single transaction. DDD allows for only single aggregate manipulation per transaction. Use the outbox pattern to continue the logic.
2 months ago
1
1
0
Don't wait for long running jobs. Instead, return quickly with a JobHandle object, that can be used to track the progress of the job.
2 months ago
0
6
0
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.
2 months ago
0
2
0
Learn Linux before Docker, Kubernetes and AWS. They are derived technology from the OS. And you'll understand them deeper by knowing Linux.
2 months ago
0
12
3
A good adapter demands no changes from the domain.
2 months ago
0
0
0
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?
2 months ago
0
2
0
When making changes, always reconstitute the whole aggregate. Even if it's a tiny change. That way you can verify no business constraint is broken. You can always optimize this later on.
2 months ago
0
2
0
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.
2 months ago
0
3
0
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.
2 months ago
2
11
0
Insert much of the validation logic inside Value Objects. You'll have cleaner Services, and you won't forget to do it.
2 months ago
1
5
0
Keep each endpoint's logic simple and small. If the logic becomes too complex, try to split it into multiple endpoints, with the front-end ensuring the whole workflow completes.
3 months ago
1
7
0
If you want rich business logic on the back-end, you can't have a crud-based front-end. Only task-based UIs can specify "intent".
3 months ago
1
8
0
The application layer has multiple inner-layers of different responsibilities. Don't fit everything into a single "service" class.
3 months ago
1
4
0
Write down a short essay explaining the system. It will reveal many subtle details on how the system should work.
3 months ago
0
10
0
Use a command when you intend to do a specific action, and follow through to the result. Use an event when you want to inform of a change, but don't care who gets it.
3 months ago
2
4
1
Don't overuse the User class. It's there mostly for access control. Define different "actors" for the different contexts that User can be in. (e.g. Account, Employee, Profile, ...)
3 months ago
0
5
0
Good interfaces present behavior. Bad interfaces "update" objects.
3 months ago
0
11
2
"How do I eliminate the need for this dependency?" - a question that, more often than not, leads to a better design.
3 months ago
0
9
0
If the fulfillment of a command entails a new dependency between bounded contexts, you should probably split the command into two.
3 months ago
0
3
0
The owner of commands is the back-end. The owner of queries is the front-end.
3 months ago
0
2
0
What makes an app, a "web" app, is just the tiny adaptive layer of controllers that transform the HTTP request into a command or query sent to the app.
3 months ago
0
3
0
Good software design mostly means good dependency management.
3 months ago
0
2
0
The front-end is good when it brings multiple disparate data into a single view. The back-end is good when it separates that data into distinct, specialized modules.
3 months ago
0
5
0
you reached the end!!
feeds!
log in