Live data from Hacker News

Why Domain Driven Design?

yehohanan7.medium.com

91–100 of 175 posts

Re: Why Domain Driven Design?

#91

I thought the DDD hype has died down a bit, but I guess not. Eric Evans (inventor of DDD) has said in recent years that unfortunately once a team is big enough, all the invisible conceptual boundaries between domains blur and disappear. People do NOT have the discipline to do DDD correctly. But do you know what helps? Having physical boundaries you can't cross so easily. Microservices. Or as I call them... just "serv…

> 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…

I'd argue though that the velocity and amount of functionality between those levels increased significantly.

Re: Why Domain Driven Design?

#92
post #91

Earlier quoted context omitted.

> 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…

I'd argue though that the velocity and amount of functionality between those levels increased significantly.

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?

#93

Earlier quoted context omitted.

Microservices alone don’t solve the shared mutable state problem, and make it even worse w/ network and eventual consistency.

They solve the mutable shared state problem that I'm specifically talking about. Which is that it's clear which state you own, and which state you don't own. "Shared" implies shared ownership, this is where the confusion comes from. When you ask an API about a user's profile, it's that API's user profile. But the API response itself is entirely yours. It won't change right under your fingertips. The original profile…

You don't need an HTTP boundary to make your own copy of data.

Re: Why Domain Driven Design?

#94

Earlier quoted context omitted.

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), nor can classes cross machine boundaries easily in many languages and so on. We need a unit of division that works across machines just as…

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.

> 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?

#95

I thought the DDD hype has died down a bit, but I guess not. Eric Evans (inventor of DDD) has said in recent years that unfortunately once a team is big enough, all the invisible conceptual boundaries between domains blur and disappear. People do NOT have the discipline to do DDD correctly. But do you know what helps? Having physical boundaries you can't cross so easily. Microservices. Or as I call them... just "serv…

> 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…

Sometimes it’s just a big-ass software project which should never be touched.

Re: Why Domain Driven Design?

#96
post #77

"In essence, all principles help you to model your software in a way that’s highly cohesive and loosely coupled- They are the building blocks of a well designed software." My suggestion, stay away from all these design patterns. In my experience, they lead to overly complex code because of all the structure. The best structure is the most simple one. "When you start thinking in abstractions and create abstractions in…

KISS is also my experience. It NEEDS to be simple because maintaining code a year or more later you need code you can easily grasp.

The job descriptions of 99% of companies don't reflect that.

"It needs to be as simple as possible but not too simple"

Re: Why Domain Driven Design?

#97
post #34

My definition of DDD involves drawing up a series of relational tables in excel and reviewing those with the business stakeholders. If the product is like most, I'd then convert those excel workbooks to SQL schemas and start building some vertical slice demos. None of this has anything to do with micro services, source control, etc. The schema (domain) is the most important part of the product. If your manager can un…

DDD is about behaviour rather than just data. In fact many business domains don't map in relational very well.

Re: Why Domain Driven Design?

#98

Earlier quoted context omitted.

>But do you know what helps? Having physical boundaries you can't cross so easily. Rarely have I disagreed with something more strongly :) If a team lacks the discipline/skill/wherewithal to create good boundaries within a single code base when stakes are at their lowest, they absolutely don't have the skill or discipline to do ahead of time, across N code bases, and with a network in between all of them. Breaking yo…

You can disagree with it and blame the developers, but the fact is that DDD fails basically every time, unless physical boundaries stop you from failing. It's like saying a good driver won't have an accident on a sharp corner of an icy road, but yet you have a ton of accidents on that corner on an icy road. Facts are facts. Just as it's a fact you can't hope every organization to be staffed by 100% geniuses who never…

As far as I know developer. They will mess with all kinds of technology given to them.

You say side effects are a problem but you also say the developer cares about his structure in microservices.

When you can’t handle side effects how will you handle microservices?

You could do the same without microservices by just abstracting in libraries which have a defined API.

Microservices will normally make your application more complex. Developers will mess with them too. They can’t change the JSON but some dev will change the API of some service and read the wrong property…

Re: Why Domain Driven Design?

#99
post #77

"In essence, all principles help you to model your software in a way that’s highly cohesive and loosely coupled- They are the building blocks of a well designed software." My suggestion, stay away from all these design patterns. In my experience, they lead to overly complex code because of all the structure. The best structure is the most simple one. "When you start thinking in abstractions and create abstractions in…

> The best structure is the most simple one.

> Abstractions introduce more complexity

There is truth in both of these statements. But also:

"You can make a dog house out of anything" - Alan Kay

What he's saying is that you can't make a skyscraper out of anything. You need some structure. The trick is to get the amount of structure right. Maybe Ousterhout has the right direction with "deep modules"

Re: Why Domain Driven Design?

#100
post #2

I teach programming and software design, too. But i never use domain, driven, design,... as vocabulary. I use function all the time. "Hey guys, just use function, that's all you know to make usable software." What's the problem with NOT following "weird, confusing" patterns and vocabularies. And the result is, all of my students actually make useful code, simple code. Also, most of software recruiters will tell you:…

This is impractical in real world applications. Breaking complexity is much more than writing better code. DDD starts with listening to the subject matter experts (the business) and agreeing on language and models. You can write a hundred functions that look good, but if it isn’t aligned with how the business thinks, you will have built spaghetti code.

You surely don't know if there exists a practical real world application which only uses function. (Because you don't have access to codebase of all real world applications).

That's why your statement is logically wrong. I have no more word to say here.

Post reply on HN