Curly Braces's Avatar

Curly Braces

@loopinglife.bsky.social

Daily nuggets of software wisdom.

1,094 Followers  |  13,032 Following  |  23 Posts  |  Joined: 24.07.2025  |  1.6992

Latest posts by loopinglife.bsky.social on Bluesky

Learn Linux before Docker, Kubernetes and AWS.
They are derived technology from the OS.
And you'll understand them deeper by knowing Linux.

03.08.2025 16:39 — 👍 8    🔁 2    💬 0    📌 0

A good adapter demands no changes from the domain.

02.08.2025 17:37 — 👍 0    🔁 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?

01.08.2025 14:59 — 👍 2    🔁 0    💬 0    📌 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.

31.07.2025 14:20 — 👍 2    🔁 0    💬 0    📌 0

Which you choose will depend on the context.
• Is there only one consumer?
• Does it make sense to wait for a result?
• Which way do I want my dependencies to point?

31.07.2025 14:15 — 👍 1    🔁 0    💬 0    📌 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.

30.07.2025 15:27 — 👍 3    🔁 0    💬 0    📌 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.

29.07.2025 12:20 — 👍 10    🔁 0    💬 2    📌 0

Insert much of the validation logic inside Value Objects.
You'll have cleaner Services, and you won't forget to do it.

28.07.2025 09:50 — 👍 5    🔁 0    💬 1    📌 0

I guess you can see it that way.

The point is:
In order to specify your intent to the back-end, you must specify *what* you're doing.
Otherwise, everything's a generic update, and you can't chaing logic, policies or events to it.

27.07.2025 17:46 — 👍 2    🔁 0    💬 0    📌 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.

27.07.2025 15:03 — 👍 7    🔁 0    💬 1    📌 0

In a nutshell: Instead of designing the UI to send a whole form with the latest data, you design it so specific parts are independently sent.

Why?
Because you can design better logic if you do ChangeUserEmail or DisableUser, instead of just UpdateUser with the same information changed.

27.07.2025 14:59 — 👍 0    🔁 0    💬 1    📌 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".

26.07.2025 12:30 — 👍 9    🔁 0    💬 1    📌 0

The application layer has multiple inner-layers of different responsibilities.
Don't fit everything into a single "service" class.

26.07.2025 11:38 — 👍 4    🔁 0    💬 1    📌 0

Write down a short essay explaining the system.
It will reveal many subtle details on how the system should work.

25.07.2025 21:47 — 👍 10    🔁 0    💬 0    📌 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.

25.07.2025 13:56 — 👍 4    🔁 1    💬 2    📌 0

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, ...)

25.07.2025 12:03 — 👍 5    🔁 0    💬 0    📌 0

Good interfaces present behavior.
Bad interfaces "update" objects.

25.07.2025 00:41 — 👍 11    🔁 2    💬 0    📌 0

"How do I eliminate the need for this dependency?" - a question that, more often than not, leads to a better design.

24.07.2025 23:40 — 👍 9    🔁 0    💬 0    📌 0

If the fulfillment of a command entails a new dependency between bounded contexts, you should probably split the command into two.

24.07.2025 22:51 — 👍 3    🔁 0    💬 0    📌 0

The owner of commands is the back-end.
The owner of queries is the front-end.

24.07.2025 22:48 — 👍 2    🔁 0    💬 0    📌 1

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.

24.07.2025 22:45 — 👍 3    🔁 0    💬 0    📌 0

Good software design mostly means good dependency management.

24.07.2025 22:42 — 👍 2    🔁 0    💬 0    📌 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.

24.07.2025 22:38 — 👍 5    🔁 0    💬 0    📌 0

@loopinglife is following 20 prominent accounts