Domain-Driven Refactoring - Jimmy Bogard - NDC Porto 2022

  Рет қаралды 20,231

NDC Conferences

NDC Conferences

Күн бұрын

Пікірлер: 25
@marna_li
@marna_li 2 жыл бұрын
Great talk! What I have learned from experimenting domain-driven design is that , once you get into this mindset of thinking about the domain and how to model it, everything just gets easier to implement and refactoring is not a big deal. In my view, a good software project is less about the implementation details and more about the rules. Good abstractions makes it easier to reason about your software and change it if needed. It also leads to better quality of the software, both code and reduction if bugs. But I find that a lot of people still want separation of logic and data and a lot of abstractions just because that is what they think software should look like. Most don't even understand OOP and just write classes, which are not the subject of OOP! Getting these people to start look into Domain-driven design is hard, because it would have them to think non-technically with regards to programming - how to reason about the domain not from the point of code, but to model it to represent the domain. Still I encounter programmers who start coding without modelling. Perhaps it is the culture,
@MakeItStik
@MakeItStik 2 жыл бұрын
Nice thoughts. What would you suggest to read/watch to get OOP concepts correct ?
@VoroninPavel
@VoroninPavel 2 жыл бұрын
There's one more thing Jimmy probably had no time to mention. But after operations are moved into domain objects, we can start publishing domain events. For example, `OfferAssigned`, `OfferExpired`.
@marna_li
@marna_li 2 жыл бұрын
I think that was out of scope. Event-driven design is perhaps not the first thing to look into when being a beginner. I have met some resistance to it because it is not just small topic. Grasping all the concepts of domain-driven design has taken me some time experimenting and reading.
@judas1337
@judas1337 2 жыл бұрын
That sounds like a reason to do this refactor. As Bogard states, he probably would approve a pull request with the original code. So to motivate this refactoring something more is needed. Being able to publish domain events could be that reason.
@peteruelimaa4973
@peteruelimaa4973 2 жыл бұрын
Am I right that this packing logic into entities is kind of the opposite approach to what functional programming languages use (data is immutable and functions operate on that data)?
@pedrobettt
@pedrobettt 2 жыл бұрын
You can do a lot of this while remaining functional, as long as you make the functions entity-specific. You'd just replace the mutation of data with a whole new object instead, containing the values you'd have changed.
@rodelias9378
@rodelias9378 2 жыл бұрын
Good one!! Thanks!
@MaxCervantes1984
@MaxCervantes1984 2 жыл бұрын
I would probably encapsulate the offerValueCalculator and cancellationToken inside a delegate. Something like Func calculateOfferValue. That way I can get rid of the cancellation token on the AssignOffer signature.
@sebastianpopa4778
@sebastianpopa4778 2 ай бұрын
gave up after 20min. Started with a piece of code which was simple and readable, at 20min in was something else alright. Also, I missed the "DDD refactoring", this is just "refactoring", maybe the DDD part is later in the video
@marcotroster8247
@marcotroster8247 2 жыл бұрын
You can actually declare functions into an enum using an extension method. It's not 100% clean, but at least the usage feels right 😉
@kostasgkoutis8534
@kostasgkoutis8534 2 жыл бұрын
True but I think he had in mind going for enumeration classes that would cause issues with persisting them to the db. It can be done of course, but it would take him way longer to write it out.
@sachinjain9165
@sachinjain9165 2 жыл бұрын
Awesome !!!
@iliyan-kulishev
@iliyan-kulishev 2 жыл бұрын
Is it safe to say that if you are not dealing with complex business logic you don't need a domain layer? I'm developing a system that really looks somewhat like this one before the refactorings and it works.
@TheHabibass
@TheHabibass 2 жыл бұрын
You can (and you should) manage without domain-modelling If you are dealing with a simple CRUD, transaction scripts should be enough.
@madskaddie
@madskaddie 2 жыл бұрын
aligned language (programming/users/stakeholders) is a very interesting idea but only available in english speaking contexts
@RemcoPeggeman
@RemcoPeggeman 2 жыл бұрын
A work-around that worked best for us is to agree on the domain language with the business (in the original language) and document a set of translations (in English) within the developer team. We did that in a glossary format in Notion where we created a table with Original Word, Meaning, Agreed upon Translation.
@oloidhexasphericon5349
@oloidhexasphericon5349 2 жыл бұрын
I don't understand the whole point of doing this at all !! Aren't DTO classes just supposed to have properties like POCO s ?? (DBModel -> DT0 -> ViewModel ) Why are we putting business logic inside them ?? We could just create more service classes to extract the webrequest and extra stuff. Also which 'domain' should handle which part of the logic seems to become less clear. With more services, we break down services till they do only that 1 piece of logic
@GuilhermeNeubaner
@GuilhermeNeubaner 2 жыл бұрын
they are not DTO classes, they are entities, which owns data and behavior.
@stefanotorelli3688
@stefanotorelli3688 Жыл бұрын
Good ADV for Resharp. All refactoring without one test. bad bad bad.
@RajaKajiev
@RajaKajiev 2 жыл бұрын
Sorry, but I've lost the point of all those renamings and moves and renamings and moves and renam.... somewhere in the middle of the talk.
@m4r10x2
@m4r10x2 2 жыл бұрын
So watch again and focus
@RajaKajiev
@RajaKajiev 2 жыл бұрын
@@m4r10x2 sorry, but I don't want to waste my time watching JetBrainz promo one more time. That guy (J.B.) has tons of live coding sesions, which are more meaningful than this ad "talk".
@zdabka
@zdabka 2 жыл бұрын
No sound :(
@mansoursepehrjoo7568
@mansoursepehrjoo7568 2 жыл бұрын
Awesome !!!
Fractals, Factories and Fast Food - Dylan Beattie - NDC Porto 2022
44:54
Domain-Driven Refactoring - Jimmy Bogard - NDC London 2022
1:00:03
NDC Conferences
Рет қаралды 47 М.
From Small To Giant 0%🍫 VS 100%🍫 #katebrush #shorts #gummy
00:19
Back to Basics: Efficient Async and Await - Filip Ekberg - NDC Porto 2022
1:02:00
Domain Driven Design: The Good Parts - Jimmy Bogard
58:39
NDC Conferences
Рет қаралды 221 М.
Strategic Domain-Driven Refactorings - Henning Schwentner - DDD Europe 2023
1:00:35
Domain-Driven Design Europe
Рет қаралды 7 М.
Refactoring Is Not Just Clickbait - Kevlin Henney - NDC London 2023
1:07:25
Vertical Slice Architecture (Jimmy Bogard)
1:35:42
Tech Excellence
Рет қаралды 12 М.
Refactoring DDD, Zurich 2023
1:29:59
IDesignIncTV
Рет қаралды 4,3 М.
Modeling a Domain With Domain-Driven Design From Scratch | DDD
19:10
Milan Jovanović
Рет қаралды 92 М.
Euruko2009 / Adhearsion / by Jason Goecke
44:20
Domain-Driven Design Made Me Realize Something About AI Tools
14:39
From Small To Giant 0%🍫 VS 100%🍫 #katebrush #shorts #gummy
00:19