@brunoborges@unclebobmartin@esrtweet And with a deterministic solution for 90% of the boilerplate needed to set up everything from zero. Focus on business only, not if the agent messed up with a route configuration that does not accept requests
You don't need Lombok anymore.
Records replace Data, Value, Getter, Setter, ToString, EqualsAndHashCode. var replaces val. try-with-resources replaces Cleanup. Your IDE handles Builder.
The best dependency is the one you don't need.
Java caught up. Time to update the playbook.
๐ https://t.co/51Zz8uOb9N
@gunnarmorling Some years ago I wouldn't agree, but adding this small detail in your domain model makes things so much simpler. Next, make people learn that when you fetch your domain inside a transaction and make changes to it, you don't need to call '.save' because it's done automatically ๐
No, you do not need `@RequiredArgsConstructor`. Your IDE can generate a perfectly nice constructor for you. Another day running into a misconfigured Lombok, missing annotations copied into constructor arguments ๐ซ #Java#JustWriteJava
@VaughnVernon Thanks for the explanation. Indeed when looked this way they are not the same thing, they have different purposes.
I'll need some re-read of the patterns. Thanks again for the time explaining it.
@VaughnVernon Ok, I didn't quite get the second point ๐ .
But, would memento be a way of implementing Event Sourcing? No UI, pure backend exchange of meaningful events from my app. Or are my thoughts misleading?
There is a major confusion about #DDDesign and the Ubiquitous Language. Surprisingly, even some who claim to know DDD well don't understand this. A Ubiquitous Language is 100% within a single Bounded Context. It is NOT a business-wide language that is enforced throughout the organization. It is ubiquitous only within the team that owns the Bounded Context. Every Bounded Context has its own Ubiquitous Language. It is ubiquitous within the team, where every conversation, drawing, documentation, and source code "speaks" the language.
Stated another way, a Ubiquitous Language is NOT a canonical model.
If any terms are used within other Bounded Contexts, they likely have different meanings. If not, it is still not canonical, because the meanings could change in one context but not another.
Shared Kernel might be useful but is not meant to be a broad standard. In any case, when a Shared Kernel is useful, the kernel is *small* and speaks a *very limited* common language on behalf of multiple Bounded Contexts. Yes, it becomes part of the language of every context that uses it. Still, this most useful for broad concepts such as monetary, dates/times (no, not as in language libraries), and truly organization-wide common concepts, such as branch, brewery, where the concept is very thin, such as with a standard id, country code, and other descriptive information that spans context-specific concepts.
#Lombok is the perfect demonstration that the simple fact that is technically possible to do something neither implies that is a good idea nor represents a good enough reason to actually do it.
@sivalabs@mariofusco If you have an anemic class just for data, why not a fully public class without any annotation? It will have the same effect as get/set without domain logic.