Vladimir Khorikov: DDD in a nutshell

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ต.ค. 2024

ความคิดเห็น • 27

  • @ArtGorr
    @ArtGorr 2 ปีที่แล้ว +12

    I strongly recommend Vladimir's Unit Testing Book.

  •  9 หลายเดือนก่อน +1

    Just a comment, this talk is pure gold 😊

  • @maciejpszczolinski5726
    @maciejpszczolinski5726 2 ปีที่แล้ว +8

    Vladimir's content always deserves upvote. Great presentation.

  • @marcdeparis9037
    @marcdeparis9037 2 ปีที่แล้ว +2

    Merci Monsieur Khorikov ! Very good presentation !

  • @DanielJ-lu6ey
    @DanielJ-lu6ey ปีที่แล้ว

    Great job Vlad!Excellent video!

  • @branislavpetrovic7486
    @branislavpetrovic7486 2 ปีที่แล้ว +2

    Great presentation and talk!
    Thanks to Centric and Vladimir

  • @learninghowtolearn8456
    @learninghowtolearn8456 2 ปีที่แล้ว +2

    Very nice discussion.. really enjoying. Thank you vlad

  • @singarajusreedhar
    @singarajusreedhar ปีที่แล้ว

    Very good making Theory more practically relatable. Thanks much

  • @liammullan2197
    @liammullan2197 2 ปีที่แล้ว +1

    A fantastic presentation, many thanks!

  • @xposedcadabiola.o111
    @xposedcadabiola.o111 ปีที่แล้ว

    Vlad makes learning DDD concepts very easy. Well done Vlad.

  • @fieryscorpion
    @fieryscorpion ปีที่แล้ว

    Great presentation. Thank you!

  • @whyrwehere
    @whyrwehere 11 หลายเดือนก่อน

    Thank you for explaining Kingdom Hearts 3D: Dream Drop Distance 😊

  • @henriquesouza5109
    @henriquesouza5109 2 ปีที่แล้ว +9

    1:10:15 Actually the repository is exactly the customer list you would pass if you didn't have a database, still. Repositories are a domain concept, they have nothing to do with the database, it's the collection of your entities, which can be in local memory (CPU cache, RAM, Disk) or remote (databases, remote disks). That's why the interface of them are in the domain layer, while the implementations are not. Of course in 99% of the domains the place where you store your entities aren't called "repositories", just like people responsible to do jobs related to some entity aren't called "Services", these are just generic names (that you should avoid when possible). For example, an isp/phone line company may lookup their phone numbers catalog to check for unique numbers to assign to a new customer. Or in your case, validate email uniqueness before changing it.
    "A Repository mediates between the domain and data mapping layers, acting like an in-memory domain object collection." - Martin Fowler
    Great presentation anyway, love your content Vladimir Khorikov!

    • @VoroninPavel
      @VoroninPavel 2 ปีที่แล้ว

      Also, call to repository requires passing correct parameters, which likely belong to domain anyway. If we chose to pass materialized instance to the entity's method, then there should be a check that passed value is relevant (e.g. its id is the same as in the reference entity holds.)

    • @fellowseb
      @fellowseb ปีที่แล้ว +1

      This is a disputed topic I know; but I disagree :). Do you know many Domain experts that use the notion of Repository ? No, it's an Application concern IMO, with the Use Cases. If you never have to "apply" a Domain Model then there's no need for saving or loading entities. The actual implementation of the Repository would belong to a DataAccess/infra layer.
      Martin Fowler's sentence still stands with this design: the Repository mediates between Domain and Data Access layers by depending on both; but for the sake of the use cases hosted in the Application layer.

    • @henriquesouza5109
      @henriquesouza5109 ปีที่แล้ว +1

      @@fellowseb Thanks for disagreeing. Btw even I disagree with myself 1 year ago. I've learned that we shouldn't talk about "the domain" as if there was only one into play (as I did when I said "repositories are a domain concept"). What happens actually is that everything has a domain, and you should be separating them as modules inside your application, each one with its concern (all of them are important!).
      That being said, when you say: "Do you know many Domain experts that use the notion of Repository? None", I could point the catalog domain, which is the domain that registers stuff so they are trackable, and they do exist in the domain experts lives, with your system or not, they have to do it (obviously they don't call it Repository tho). What happens is that cataloging has a common thing between all entities, that is: record uniqueness ensurance, queries, add/removal... etc. This means this common aspect can be (and usually is) modeled with Generics. And that's very fair. If you look closer at List, IEnumerable, Arrays containers... they are all generic, right?
      I still stand mostly of what I said, though. """"Repositories""" are just another container for your entities, a custom one, they are no different (in interface) than a List, an Array, or any other container. That's also why I like to call them "EntityCollection", or more recently "EntitySet", because there can't be duplicates.
      I do think that they could belong to a "supporting" domain (an infra domain?), but infra just like you use C# (or any other language) primitives: ints, strings, lists... It would compose the infrastructure of your domain (this can sound harsh for the purists, but yeah your domain do depend on some trivial semantics to exist).

  • @robertmarriott1008
    @robertmarriott1008 ปีที่แล้ว

    Outstanding! This video really helps clarify the concepts as I go through the O'Reilly book on DDD. Is there a GitHub repository to view a complete example?

  • @IvanenkoStepan
    @IvanenkoStepan ปีที่แล้ว +1

    Thanx for russian subtitles

  • @wojciechwilimowski985
    @wojciechwilimowski985 ปีที่แล้ว

    If you give up encapsulation and choose purity, you end up also losing the purity.
    In the example you have to move part of the domain logic to the controller. This means the controller now _is_ part of your domain model implementation, and it refers to an out-of-process dependency (the repository). So you have now given up purity as well, by introducing an impure method into your domain model.
    By contrast, if you give up purity (ie. pass a reference to the repository into the domain model), you are not automatically giving up encapsulation - all the logic is still in one class.

  • @singarajusreedhar
    @singarajusreedhar ปีที่แล้ว

    The Customer example was not so sounding practically where it was mentioned to repeat the code

  • @buttonmedia9352
    @buttonmedia9352 2 ปีที่แล้ว

    Great presentation. I am just confused by the idea of synchronizing data between contexts. Creating duplicity in data is considered bad practice isnt it?

    • @pilotboba
      @pilotboba ปีที่แล้ว +1

      Is caching data a bad practice? I think in this case you have your source of truth and your cache. if these bounded contexts were each a micro service, they would each have their own storage. You don't want to have to make a call to the Support microservice everytime the Sales microservice needs an attribute of the customer owned by the Support service.
      That said, in a monolith while I might have different classes in each context, I would probably store them in the same persistence object (table).
      At least that's how I see it.

  • @VoroninPavel
    @VoroninPavel 2 ปีที่แล้ว +1

    [1:40:17] Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design and F#
    Book by Scott Wlaschin

  • @lucasterable
    @lucasterable 2 ปีที่แล้ว +2

    ...a rather big nutshell :P

    • @pedroalexandre157
      @pedroalexandre157 ปีที่แล้ว

      DDD is not something that can be properly "nutshelled". It's rather dense and has a lot of different concepts which may lead to different interpretations and so on and so forth... definitely not a "nutshellable" thing lol. Vlad did great though -- showing code it's always more effective for comprehension, I think.

  • @christoslavkov2402
    @christoslavkov2402 ปีที่แล้ว +1

    1:13h in - btw can you hear me? :D

  • @IvanenkoStepan
    @IvanenkoStepan ปีที่แล้ว +1

    very nice accent ))) Are they Russians, Ukrainians or Poles?