News for hackers. Stuff that matters.
Re:Why Domain Driven Design? by marginalia_nu on Friday November 25, 2022 @04:55AM (#33740894)
> But do you know what helps? Having physical boundaries you can't cross so easily. Microservices. Or as I call them... just "services". Eric Evans has said that people using microservices may represent the most successful application of DDD's principles, not because people using them were fans or even aware of DDD, but microservices enforce the patterns DDD Evans was describing.

Sir, your assembly code is so hard to read with all them GOTOs. You should do structured programming, use constructs such as loops to make it easier to follow.

Man, your code is so long written like that, you should break it into functions to make it easier to reason about.

Dude, you have so many functions it's impossible to make heads or tails of the logic, you should break it into classes to be able to abstract away all of this detail.

Bro, you have so many classes I don't even know where to start. You should introduce modules so that it becomes possible to isolate different parts of the design.

Dawg, you have so many modules, you ought to break them into small different runtimes communicating via a rest protocol to isolate different parts of the code.

Choom, you have so many microservices, you ought to break them into different microclusters to separate the different parts of the API.

X'man, you have so many microclusters, you really ought to break them into different miniclouds to spearate the functionality and make it easier to follow.

𐀘𐀐, you have so many miniclouds it's impossible to deal with this code, you really ought to separate it into functional minicloud clusters.

Re:Why Domain Driven Design? by Scarblac on Friday November 25, 2022 @05:18AM (#33741002)
It's as I've always said, every function ("unit") should be responsible for a single thing, and it must be developed by an independent company with no knowledge of the other companies involved. Otherwise you just can't do software engineering right.
Re:Why Domain Driven Design? by still_grokking on Friday November 25, 2022 @05:53AM (#33741187)
This sounds brilliant!

What's the marketing name for that?

Re:Why Domain Driven Design? by withinboredom on Friday November 25, 2022 @06:16AM (#33741326)
I’ve called it Model-T development[1]. The Model-T brought standardization to building cars where companies only built to a very specific spec. It didn’t matter that some companies would be better than others, or cheaper/expensive. The point was choice, competition, and interchangeable parts. Granted, I don’t actually know about that, but that’s the end result.

[1]: I apparently deleted the post so I’ll have to undelete it and come update this comment.

Re:Why Domain Driven Design? by goto11 on Friday November 25, 2022 @06:10AM (#33741289)
"Lose coupling"
Re:Why Domain Driven Design? by layer8 on Friday November 25, 2022 @09:08AM (#33742495)
It’s called separating interface from implementation. When using an interface, only make assumptions on what the interface specifies, and not on how it may happen to be implemented. When implementing an interface, only make assumptions on what the interface specifies, and not on how it may happen to be used.
Re:Why Domain Driven Design? by gadflyinyoureye on Friday November 25, 2022 @02:05PM (#33745707)
Even this confuses people. Often the name of the interface is something like S3Client. No, the name should be something like PolicyWriter.
Re:Why Domain Driven Design? by cutemonster on Friday November 25, 2022 @07:07PM (#33748377)
It's called Microcompanies.

>> Otherwise [without microcompanies] you just can't do software engineering right.

So true

Re:Why Domain Driven Design? by mannykannot on Friday November 25, 2022 @09:45AM (#33742806)
For that to work, there has to be, somewhere, a clear understanding of how the units all work together to achieve the higher-level goals without violating the higher-level constraints which, in practice, increase in number and scope the higher up the pyramid of abstraction you go. Pace Robert Martin, divide-and-conquer cannot be used to reduce systems-level thinking to doing just one thing, even in an abstract sense.
Re:Why Domain Driven Design? by Scarblac on Saturday November 26, 2022 @05:34AM (#33751554)
> For that to work, there has to be, somewhere, a clear understanding of how the units all work together to achieve the higher-level goals without violating the higher-level constraints which, in practice, increase in number and scope the higher up the pyramid of abstraction you go.

Oh, that's an implementation detail. The market will sort it out.

Re:Why Domain Driven Design? by nightski on Friday November 25, 2022 @02:46PM (#33746068)
This only works if you have a blockchain to keep track of it all. ;)
Re:Why Domain Driven Design? by Scarblac on Saturday November 26, 2022 @05:37AM (#33751567)
I'm not decided on that. On the one hand, sure, blockchain should be involved! But the single thing per company requirement would mean that the company could do nothing else but a blockchain with nothing on it.

But it does sound enticingly pure, a conglomerate of blockchain companies without further function.

Re:Why Domain Driven Design? by nuancebydefault on Friday November 25, 2022 @03:22PM (#33746362)
I believe that never works in practice. The thing that binds units together is also code. Only while designing / implementing that code, you encounter the flaws in the interfaces of those units, and conclude that half of the units need to be replaced or their specifications need change.
Re:Why Domain Driven Design? by cutemonster on Friday November 25, 2022 @07:24PM (#33748506)
Sure, that's how things used to be.

But this approach, Microcompanies as it is called (units developed by independent companies), is also partly no-code, in that the specifications and different functional units are glued together using lawyers.

Re:Why Domain Driven Design? by Scarblac on Saturday November 26, 2022 @05:40AM (#33751583)
> in that the specifications and different functional units are glued together using lawyers.

Exactly! And it all runs on the invisible hand of the free market.

Re:Why Domain Driven Design? by nopeYouAreWrong on Friday November 25, 2022 @05:06AM (#33740951)
this is a good summary of why I pay zero attention to power point decks and blog posts. there is never a right answer and it's just people masturbating in circles. it's not rocket science, half of the time it's not even computer science. design patterns, at a certain point, become full of themselves.
Re:Why Domain Driven Design? by BulgarianIdiot on Friday November 25, 2022 @06:18AM (#33741333)
Exactly. We need RECURSIVE DIVISION of compute/state entities.

Our main mistake is that we invent a level of division, and never make it recursive, i.e. a class is badly designed to be an entire module, it can't contain classes (inner Java classes are not what I'm talking about), not can classes cross machine boundaries easily in many languages and so on.

We need a unit of division that works across machines just as well as it works across files, or across statements in the same file, up from data centers to CPU instructions.

Our languages and platforms are full of the SAME THING but SLIGHTLY DIFFERENT, under DIFFERENT NAMES. You listed many of them. Machine opcode, expression, function, class, module, service etc.

Re:Why Domain Driven Design? by marcosdumay on Friday November 25, 2022 @08:40AM (#33742262)
Modules are recursive. Libraries are recursive. Hell, functions and classes are recursive too. I don't think we have any non-recursive code abstraction tool.

Some of the problem is that people need different capabilities from different abstraction layers. The rest of the problem is that there are a lot of incompetent people creating software.

Re:Why Domain Driven Design? by BulgarianIdiot on Friday November 25, 2022 @08:54AM (#33742376)
If you start listing what different capabilities you need on each layer, you'll notice it can all be done, as a very lean abstraction, in one layer. I'm working on creating a platform that's doing just that, BTW.

I'll cite Erlang as an example that comes somewhat close to what I mean. An Erlang process is a function, a class, a module, and a remote service, all at once. It can be done. We just never stopped to truly think about it and try.

Re:Why Domain Driven Design? by marcosdumay on Friday November 25, 2022 @09:35AM (#33742715)
> We just never stopped to truly think about it and try.

Oh, you are right about this. But a lot of people stopped to think about it. It always seemed to fail due to market failures, like most other innovations in development.

Re:Why Domain Driven Design? by BulgarianIdiot on Saturday November 26, 2022 @12:42AM (#33750308)
Yes, the network effects of pre-existing platforms are big. But we should keep trying I think. I think such a platform should also be inclusive enough hat it can act as a glue layer for and INSIDE existing platforms, but have richer semantics than say JSON, Protobuff or similar protocols offer.
Re:Why Domain Driven Design? by Garlef on Friday November 25, 2022 @09:57AM (#33742936)
> I don't think we have any non-recursive code abstraction tool.

Mircoservices, Projects in a monorepo, Infrastructure as code, ...

Sometimes they don't even have abstractions at all.

And there are whole companies being built to make these things even remotely managable.

Re:Why Domain Driven Design? by edejong on Friday November 25, 2022 @12:38PM (#33744829)
You might become interested in actor systems.
Re:Why Domain Driven Design? by qazxcvbnm on Saturday November 26, 2022 @05:24AM (#33751511)
What's the correct level of division?
Re:Why Domain Driven Design? by lakomen on Friday November 25, 2022 @09:40AM (#33742761)
So, in short structure is half the code, is what I always say
Re:Why Domain Driven Design? by malaute on Friday November 25, 2022 @09:47AM (#33742829)
I'd argue though that the velocity and amount of functionality between those levels increased significantly.
Re:Why Domain Driven Design? by marginalia_nu on Friday November 25, 2022 @09:51AM (#33742862)
Eh, I'd argue the amount of functionality has if anything stagnated.

Computers today don't do significantly more than they did 25 years ago. They just do the same things with 1000 times more resources across a global computer network.

Likewise, velocity is startlingly bad if you follow conventional advice.

Re:Why Domain Driven Design? by larsonnn on Friday November 25, 2022 @09:58AM (#33742947)
Sometimes it’s just a big-ass software project which should never be touched.