Composite Pattern - Design Patterns (ep 14)

Поделиться
HTML-код
  • Опубликовано: 1 ноя 2024

Комментарии • 205

  • @isaaczhu9223
    @isaaczhu9223 6 лет назад +136

    Thumb up for that board-eraser jump 16:03, hahaha

    • @ChristopherOkhravi
      @ChristopherOkhravi  6 лет назад +4

      😊😊😊

    • @gerdkah6064
      @gerdkah6064 5 лет назад +3

      there ist a composition of 2 Christophers at 16:09 ^^

    • @sshanzel
      @sshanzel 4 года назад

      Chris: Jump at 16:03
      Me: Subscribe (just kidding, ive been subs since ep 1)

  • @jriseup7201
    @jriseup7201 6 лет назад +66

    The best design patterns video tutorial series i've seen until now on youtube!

  • @amiramohammed1568
    @amiramohammed1568 Год назад +2

    we are in 2023 and you are the best one out there teaching design patterns ! THANK YOU

  • @divyeshkumarbalar7732
    @divyeshkumarbalar7732 28 дней назад

    I could have watched a movie or a series for 1 hour 11 minutes; however, i choose composite pattern! Kind of proud of it and happy to see people in the comments who cares about the code they write and appreciate a good design

  • @prateeksharma9321
    @prateeksharma9321 6 лет назад +32

    I wish my university had teachers like you.
    Thank you!

  • @OscarAgreda
    @OscarAgreda Месяц назад

    This video still applicable in 2024. Amazing , it provides a solid exploration of the Composite Pattern, highlighting its usefulness in hierarchical structures and recursive operations. The emphasis on simplifying code through polymorphism and recursion is awesome. The discussion on immutability adds an important perspective, as it aligns well with modern C# practices.

  • @segafrompk
    @segafrompk 4 года назад +21

    Hey Chris! Love your videos and I'm learning so much from you! Thank you for making these, I really appreciate it! I'm sad that you are not uploading anymore, but that's life, I know it's hard to make a living on RUclips. Hope you would make some CS course on udemy or a similar platform, you are a great teacher and you are great at making others pay attention even during these long videos. Cheers!

  • @martijn2973
    @martijn2973 Год назад +3

    Holy shit, I've never had someone explain abstract concepts so clearly. Every single time I was thinking "but if he says this, how does this scenario work?", and like 3 seconds later, he would further explain exactly what I was doubting.

  • @Koriyi
    @Koriyi 3 года назад +5

    This tutorial series is great! Right now I am watching all of them to study for my masters CS degree and I love your way of explaining things in a simple but entertaining way. Just wanted to say it is the best tutorial series on this topic i have found. Thank you so much!

  • @pacoraby532
    @pacoraby532 6 месяцев назад +2

    I love how he confuses himself with all the open and close tags; man, that was pure gold. It just goes to show it happens to the best of us. This is the best pedagogical series on design patterns, hands down, and it's kind of funny on top of it. Thank you, Christopher.

  • @dp-bhatt
    @dp-bhatt 7 лет назад +9

    One of the best tutorials I have ever watched on Composite design pattern. Thank you very much.

    • @ChristopherOkhravi
      @ChristopherOkhravi  7 лет назад +1

      Thanks :) I’m glad to hear :) Thanks for watching and for commenting.

  • @dannievasileva9069
    @dannievasileva9069 4 месяца назад +1

    Thank you so much for this series, it has been immensely helpful. Please never stop teaching!

  • @EuanFR
    @EuanFR 6 лет назад +4

    I was asked during an interview to design code that compute the price of boxes containing items. Assuming that each item inside the box has a price, and that the box itself has a price.
    I responded with a recursive code, including a "if" statement.
    When the interviewer asked about the composite pattern, which would have been another way of doing it, I didn't know... I somehow had the job.
    But now, I could talk about composite pattern (thanks :) ).

  • @yoruwamatahajimaru
    @yoruwamatahajimaru Год назад +1

    Hi! I am a newbie, I have been watching these videos in the playlist order, starting with the first one. In the beginning, I barely understood the abstract part and had to look up examples of patterns in the language I am studying to at least barely understand how they work. In this video, I finally understood the abstract pattern just from your explanation (and it took only a week and a half). Thank you.

  • @arthurfedotiew3609
    @arthurfedotiew3609 2 года назад +1

    “Removing this stuff” at 16:10 is the only thing you are better at than being the best OOP patterns teacher on RUclips! For real, that was fookin epic!

    • @shankar7435
      @shankar7435 9 месяцев назад

      You mean is he not good at explaining patterns.

  • @lucad4472
    @lucad4472 4 года назад +1

    Hi Christopher, I'm Italian, I'm studying Computer science at university. I'd like to thank you for this amazing playlist (GoF strategy patterns). I successfully passed the "Software engineering subject" with 30/30. Whiteout your video I would have never been able to do this. THANK YOU SO MUCH. I hope you will read this! I wish you the best. Sorry for any English mistakes.

  • @henriquedesouza412
    @henriquedesouza412 3 года назад +1

    Thank u SO MUCH !
    with 15 minutes of this content I could understand the composite design patter
    Greatings from Brazil !

  • @ianauandrei
    @ianauandrei 4 года назад +1

    PING. All the explanations you are saying make a lot of sense and they really do make us (at least in my case) understand better and question our knowledge as WHY we do a certain thing. You are a good educator.

  • @georgebadza
    @georgebadza 2 года назад +1

    Great lessons, very easy-to-understand complex topics, even though the lessons are long.
    The type of aggregation arrows are necessary for UML diagrams sometimes, and they are not vague if you'll think about it.
    The aggregation arrows are of two types in UML, has one and has many, the one, used in this tutorial is - has many.
    So it means, that the particular component has many parent components.

  • @МаксимАлексеев-ч4й
    @МаксимАлексеев-ч4й 4 года назад +4

    The best discussion about this pattern I'd found on youtube. That's what I was looking for after reading the book's chapter. Thank you!

  • @machi992
    @machi992 3 года назад +1

    I must say this channel is my discovery of the week.

  • @JitendraSarswat
    @JitendraSarswat 7 лет назад +48

    Yeah... I would love to see a discussion over recursion. Can you do that?

    • @ChristopherOkhravi
      @ChristopherOkhravi  7 лет назад +22

      Thanks for the ping :) :) I’m planning an algorithms series and this video will probably go into that series. Need to think a bit about how to approach it. Maybe I should just e.g. do a series where I compare non-recursive solutions to recursive solutions. Or something along those lines :) Thanks again for the ping and for watching :)

    • @josipmareljic9092
      @josipmareljic9092 5 лет назад

      @@ChristopherOkhravi What ever approach you prefer, it doesn't matter, just do it. U R great

    • @prashantsomvanshi574
      @prashantsomvanshi574 4 года назад +1

      @@ChristopherOkhravi algorithm series please

  • @nandukishore844
    @nandukishore844 6 лет назад +13

    at around 27:00 min in the video you have mentioned "interface segregation principle" and you said leaves should not be forced to have add() and/remove() methods but what I think is leaves are not permanently leaves in this scenario .We can see leaves as children or teenagers who might become parents at some point of their life-cycle .

  • @denispronin2417
    @denispronin2417 6 лет назад +2

    You should go on the stage with such a proficient mimic and wonderful performances in front of the camera :) thank you for these series, I have got addicted to them

  • @josephtuk3834
    @josephtuk3834 3 года назад

    You have a clear voice, you explained well. You're good. Thank you.

  • @anonymousmask4224
    @anonymousmask4224 2 года назад

    It's 2021 and still best explanation on the internet.

  • @shraddheshbhandari8740
    @shraddheshbhandari8740 6 лет назад

    Great video. The ToDoList example nailed the principles of the pattern. Practical examples perfectly highlight the need and use of design patterns.
    The point you were trying to convey with the mutability discussion regarding whether a mutated object is the same object as before or a new one is actually a programmatic case of the famous paradox called Theseus's paradox.

  • @raghuhuchchannavar6184
    @raghuhuchchannavar6184 2 года назад

    The best design patterns video tutorial series i have seen until now . Superb

  • @ShyamSharma-pg1zu
    @ShyamSharma-pg1zu 3 года назад

    Awesome . Listening you is like doing meditation . Its not easy to get out of focus

  • @Tall-Cool-Drink
    @Tall-Cool-Drink 6 лет назад +1

    Christopher, you have a way of making everything interesting.......lol....so discuss away, I'll be watching and listening.

  • @Defiguss
    @Defiguss Год назад

    Thank you so much! You can't imagine how helpful these videos are. At least for me, this seems like the best way to explain design patterns.

  • @swellbot5738
    @swellbot5738 7 лет назад +2

    Had an exam 2 weeks ago, used all your videos for study and this one came up - was so gutted you hadn't made it sooner. Either way, here I am watching it because the quality of your videos are great. props. Keep on doing what you're doing.

    • @ChristopherOkhravi
      @ChristopherOkhravi  7 лет назад

      I'm sorry to hear and terribly sorry I wasn't able to upload sooner :( It takes an outrageous amount of time to edit these videos :D Either way, I hope you do get a chance for a re-exam :) and I hope you nail it :D Thanks for watching and for the encouragement :)

    • @swellbot5738
      @swellbot5738 7 лет назад

      Christopher Okhravi oh mate don't worry in the slightest. I just had to look elsewhere for this one, got it in the end, you just articulate and explain it so nicely you became a 'one stop shop'.
      I was hoping the strategy pattern would come up so I could wow them with your quote from sandi metz about inheritance haha :D
      Rock on, keep it up, look forward to your future videos

  • @salsaSamuel
    @salsaSamuel 6 лет назад

    That design patterns book is the required text for my Uni class, but I couldn't understand it. Thank you so much, these videos facilitate real learning!

  • @baja_taco3564
    @baja_taco3564 Год назад

    You have a tremendous teaching gift bro I visit your videos still to this day. You can dice a complex concept into an understandable form for your listeners. I hope you are doing well bro!

  • @ashishgarwal4103
    @ashishgarwal4103 3 года назад

    Super thumbs up, Christopher. You explained in a very simplified way.

  • @ArtcodEAscetik
    @ArtcodEAscetik 2 года назад

    I've made some PHP HTMLElement with this D.P.. Works fine !

  • @VoyagerJourneys
    @VoyagerJourneys 2 года назад

    Hey man. I like your videos. I watch your video after I read one chapter of book. It is so helful for me.

  • @kartikmangal3218
    @kartikmangal3218 2 года назад +1

    Hey Chris,
    I really love while watching your videos coz you make it so interesting and easy to understand. I am very glad to have your DP series to learn from.
    I was wondering if you could please put a series on DSA as well coz I have been finding it difficult to make a proper decision in what way to start grasping them and what is the right resource for me but after watching your DP series I was wondering if you could please take out your precious time for a DSA series.
    Thanks and a lot of support

  • @JohnReloaded
    @JohnReloaded 6 лет назад +3

    Yes, a video about recursion, in particular about backtracking, would be great!

    • @anydobre1796
      @anydobre1796 3 года назад

      Absolutely. I would love to have recursion explained by Mr Christopher. Did he post anything like that, does anyone know?

  • @DhrumilShahDOTin
    @DhrumilShahDOTin 4 года назад +1

    he specified so many times about books ... finally, I bought it on kindle ...

  • @elisedappollone8643
    @elisedappollone8643 4 года назад +3

    Love these videos! I would be interested in seeing a further discussion about handling the add()/remove() scenarios with mutability vs. immutability. Did another video ever get made to go over how that would work?

    • @hanscesa5678
      @hanscesa5678 2 года назад +1

      Hi, have you got your answer already? Mind if you share it? I'm currently looking for it too

  • @Messier_-82
    @Messier_-82 6 лет назад +4

    Great explanation as always! And yes, i'd like to see a video from you about recursion :)

  • @ChristopherOkhravi
    @ChristopherOkhravi  7 лет назад +9

    This video got demonetized :( Anyone have an idea of why the algorithm flagged the video? Maybe the "correction boxes" that I put over my face when I said the wrong word looked like censoring bad language? I requested a manual review but have to wait for it :/

    • @ChristopherOkhravi
      @ChristopherOkhravi  7 лет назад +12

      It was quickly remonetized after a surprisingly quick manual review (thank you RUclips). Unfortunately I don't know why it originally was demonetized and I guess we won't get to know since (unless I remember incorrectly) the algorithm is neural network based :D But I would really guess it was the text-over mouth-boxes. That "pattern" ought to be common in videos with heavy use of foul language :) Makes sense right? Ps. thank you very much for the concern :) :) :)

    • @JohnReloaded
      @JohnReloaded 6 лет назад

      Many others are experiencing the same issue for no reason, probably the algorithm still needs to "learn"

    • @BrutusPalmeira
      @BrutusPalmeira 5 лет назад +1

      Because you satisfied some NoAdvertise Pattern. If some ad shows advertising some other book, it is a fallacy ad principle.

  • @sia-yx3wd
    @sia-yx3wd Год назад

    You're so good at explaining!!! Thank you so much for these videos they're very helpful!!!!!!

  • @delulu6969
    @delulu6969 2 года назад

    Just to add, you don't necessarily need a heading tag inside li. Headings are for hierarchal structure of a sectioning element of the document like section, header, footer, etc (as opposed to of a flow content ie ul). You might need the first heading to make a new subsection for your list in relation to the section it's in, but not necessarily inside of them

  • @vinokanthvelu2660
    @vinokanthvelu2660 5 лет назад +2

    @Christopher Okhravi Please do the algorithm series if you have time. Will be very useful :)

  • @finestHQ
    @finestHQ Год назад

    I 100% agree on your statement regarding immutability, but in case of a tree structure, which could have many different nodes copying is quite expensive. Wondering what you would choose in such a scenario?

  • @hfontanez98
    @hfontanez98 5 лет назад +1

    One could say that a Composite Pattern is useful when a node (object) could have two distinct roles (i.e. Parent or Child, Component or Container), depending if the point of reference or a given node is root or not.

  • @ta-cvig
    @ta-cvig 4 года назад

    Thanks for this series man. I learned a lot just from 2 videos thus far.

  • @suyashpatel2652
    @suyashpatel2652 6 лет назад +1

    Thanks for making such awesome videos. I have one doubt. Why you put the logic of wrapping "ToDo" text inside in "Project" class. Shouldn't it be responsibility of "ToDo::GetHTML()" method?

  • @jvsnyc
    @jvsnyc 3 года назад

    Great video. There are some minor focus issues around 59:00 which had my eyes going googly while trying to read the updated code in the bottom right, but, great video.

  • @nijuyonkadesu
    @nijuyonkadesu 6 месяцев назад

    the pattern itself is so sophisticated, and now that I think about how to initialize this...
    ahhhh
    breaks my poor head

  • @burakkalafat763
    @burakkalafat763 2 года назад

    Great video. Only the thing is leaves do not have to implement Add and Remove methods if you don't define them at the interface, so this is not violating the interface segregation principle. We can need different methods on a composite node than leaves. It's very typical. I only can't entirely agree with that part. Other than that, it's a great explanation. Regards

  • @shayaxelrod7691
    @shayaxelrod7691 4 года назад +6

    "So what do we need to do, to do a todo list?" 🤯

  • @linux_lectures226
    @linux_lectures226 2 года назад

    had to watch 3 times now i understand thanks man

  • @joannalai7147
    @joannalai7147 2 года назад +1

    Please cover the Visitor and Builder pattern if you plan to continue this series 🙏🏼

  • @maximkuzminsky
    @maximkuzminsky 6 лет назад +8

    hi
    Why can't we just omit Leaf class from the picture? Couldn't we simply use Project with empty todos instead?

  • @nesreenmosimi9925
    @nesreenmosimi9925 6 лет назад +4

    very useful and clear , thank you alot :)

  • @matt-g-recovers
    @matt-g-recovers 5 лет назад

    I absolutely have loved this series so far Chris.
    I'm in American I'm 40 years old and I don't think that I'm too far out there but I've never heard of Part whole hierarchies... well let me digress I have heard of it, in fact it was another composition design pattern video I was watching in which I heard that term....I just don't know what it means I've never had it to find for me...

  • @codingwithgraceandtruth2456
    @codingwithgraceandtruth2456 2 года назад

    really enjoying your hard work. Thanks a lot!!!

  • @alecc8231
    @alecc8231 4 года назад +1

    Chris, another wonderful example and explanation of the pattern!
    Though I think, the interface name should've been like "TodoItem" instead of "TodoList". Then simple leaf implementation will be SingleItem: TodoItem. and ProjectItem: TodoItem.
    Does it make sense? Name "ToDoList" as an interface is confusing because it's implying a list of items already.
    Thanks, Christopher!

  • @samanehmonemirad3723
    @samanehmonemirad3723 3 года назад +2

    may I ask you for preparing a new section for "Chain of Responsibility Design Pattern"?

  • @bsuperbrain
    @bsuperbrain 7 лет назад

    Magic jump what removes stuff from the board. Haha! Anyway, nice to see this new one, long ago waited.

    • @ChristopherOkhravi
      @ChristopherOkhravi  7 лет назад

      Yeeeeah :) My editing skills are sub-par so it was tricky to figure out how to do it :D Thanks for watching and I hope the video was accommodating :)

  • @nickbarton3191
    @nickbarton3191 6 лет назад

    Another excellent topic would be dependency injection. Trying to persuade my colleagues about the case for this because of the testability of units.

  • @cyantulip
    @cyantulip 7 лет назад

    Hey Chris! Thank you so much for doing these videos. Your explanations are well thought-out and very comprehensive. I find them very helpful.
    I have a request for you. Could you please do a video about shared libraries, static vs dynamic linkage, implicit vs explicit loading, in a modern OS environment (i.e. how things work now, not how they used to work 20 years ago.)
    Oh, and I’d be interested in that recursion discussion too.
    Thanks again, and keep up the good work! :-)

  • @liorocker1
    @liorocker1 7 лет назад +1

    Yes please, hope you can explain recursion as good as you teach design patterns.

  • @MRarvai
    @MRarvai 5 лет назад

    I think at 24:00 b would be equal to 5 because the value of a is incremented after the operation ( Im only speaking for the few languages I know like C++ and C# , there might be some weird languages where this is not the case ) you'd have to use ++a ;)

    • @MRarvai
      @MRarvai 5 лет назад

      oh shoot, didn't see the correction because of the 2X speed, my bad :D :D

  • @felixjost8206
    @felixjost8206 2 года назад

    The best explanations!

  • @MrEnsiferum77
    @MrEnsiferum77 5 лет назад +1

    So what's the difference between composite pattern and n-ary tree? For example implementation In Javascript, the Node hold array as reference to all childs down the tree.

  • @leszektarnawski9460
    @leszektarnawski9460 6 лет назад +1

    Great video and the whole series. And since I am here - isn't folders structure an example of composite pattern? It is a mutable tree and any node could be either a folder or a file (leaf) but we don't want to care about it when doing operations on them - add, delete, etc. I can't think of any other way of doing folders structure.

  • @MrZnSstr
    @MrZnSstr 2 года назад

    In the book it was very confusing, this pattern it mixes my weakest skills in programming. Trees and recursion, I know conceptually what they are, but regarding trees I never used them for a solution and I can't visualize much their ideas and recursion I used it at some point with basic programs like fibonacci algorithm, but its not like I am experienced with it. I hope your video will make more sense.
    Edit: Oh shit, I went checking on trees again and I ended up watching the MIT classes.. quite a rabbithole and I am back.

  • @TubeOutside
    @TubeOutside 6 лет назад +1

    regarding the discussion about where to put add/remove(), what if there's no separate classes for leaf vs composite. What if all you got is just "component" concrete class, so logically if it doesn't contain any other component, then it should be treated as leaf, otherwise composite, then there's no need to discuss where to put the add/remove method and yet still have a "composite pattern".

  • @professorfontanez
    @professorfontanez 2 года назад

    Java Swing is built on this Design Pattern, where you have Container and Component. And really, that's how Composite Pattern should be designed. There is no need for a distinct "Leaf" class. A "Leaf" is simply a "Component" that has no sub-components. At any given point, a "Leaf" should accept new components and become a "Composite". Long story short, it is more effective to remove "Leaf" from the design and deal only with Containers and Components the way Java Swing have done it. Components containing zero sub-components are in essence leaves. However, you can transform this leaf into a composite simply by adding components to it. So, the best UML diagram for Composite Pattern is what is illustrated at 27:36 without the class "Leaf" in it.

  • @princekm5902
    @princekm5902 5 лет назад

    Hi Christopher, I have seen your video about strategic pattern.In that you discuss about the rubber duck and IFlyBehaviour interface.Similarly Can't I make an interface "IAddBehaviour" for Component and define add() into it and create two more interfaces from IAddBehaviour.Let's say AddNotSupportedBehaviour and AddSupportedBehaviour for leaf and composite respectively.Doesn't that make sense?Shouldn't we be doing that?

  • @pedromedeiros6907
    @pedromedeiros6907 Год назад

    wonderful class

  • @jessecalato4677
    @jessecalato4677 4 месяца назад

    doesn't matter much for this example, but when you talk about mutation you say @24:27 you say that b will be 6, but that's not true, you used the post decrement opperator, the value of a is returned before it is incremented, so b would actually be set to 5, and then a becomes 6.

  • @radiagulzan
    @radiagulzan 4 года назад

    You're an amazing teacher!

  • @_frank78
    @_frank78 5 лет назад

    First of all, I really must congratulate you for this series of videos.
    It is in absolute the best that I've ever seen on the design patterns.
    It's exhaustive and you succeed in explaining the design pattern having a good time.
    What I mostly appreciate, it is not the technical realization of the pattern itself,
    but the explanation of problem that is intended to be resolved, by adopting a specific pattern.
    (the "mind set" of the pattern).
    I have a question about the composite pattern:
    Is there really need of leaf class?
    I'm working on a project started by a very experienced software developer. He adopted the composite pattern but without using the leaf class; he simply uses just one class: the composite class. If a COMPOSITE instance has children, it is "considered" a "Complex-composite", if it has no children it is as a "Simple-composite" (a leaf in the original pattern, but in our case IT'S JUST A COMPOSITE CLASS INSTANCE WITH NO CHILDREN).
    When a component is added to a "Simple-composite", that one "becomes" automatically a "Complex-composite" (it was already an instance of composite class, but now it has children, and this is the only difference from its previous state).
    This involve the discussion about mutation (in our scenario, the mutation is a specific design request, and we cannot create a new tree, every time the data structure changes):
    In our scenario it is requested that the user can add to the system an "object of the real world" that it is, for instance a "car" and,
    at that specific time, the user has no information or doesn't want to insert them, about what a car is (at that point a "car" IS JUST A NAME, or a bunch of properties, and then it is a simple component, "a leaf" in the original pattern).
    In a second time, the user can or wants to specify what a car is: he specify that a car have four wheels (at this point a "wheel" IS just a name, or a bunch of properties, and then it is a simple component, a leaf, always in the original pattern), a shell (idem: a leaf) and an engine (again a leaf).
    In a third time, the user wants to define better what an engine is; so, it adds to the engine four cylinders (just names), a crankshaft (just a name), and so on... but by doing this the COMPOSITE CLASS INSTANCE "engine" becomes a "Complex-composite".
    Each time the user adds a new "real world object" to an existing simple component, the new "real world object" it's a leaf (or better a "Simple-composite") and its parent from a leaf, becomes a "Complex-composite".
    I repeat for clarity: I call them "Simple-composite" and "Complex-composite", but the class is just one: the Component.
    And finally, the question is: it is really needed to have two distinct objects: composite and leaf?
    (A father isn't just a PERSON with one or more children? and a child isn't just a PERSON without any children? (both of them are just a PERSON))
    To me this approach (that is not type checking) has the big advantage to add semplicity to data structure and permits to manage all the objects in the same way.
    What do you think about it?
    Thank you very much

    • @_frank78
      @_frank78 5 лет назад

      Sorry, i've made a mistake: "I repeat for clarity: I call them "Simple-composite" and "Complex-composite", but the class is just one: the ** COMPOSITE **".

    • @uniumuniu1176
      @uniumuniu1176 5 лет назад

      In the video 'leaf' class exists to provide different implementation for 'getHtml()' method. Obviously you can use only one class but if implementation of some method differs depending on being 'simple' or 'complex' then you have to use conditional statement in that method (and that's what in some cases people tries to avoid by using good class structure). In your scenario (with mutation being part of your design) you don't really want to use 'leaf like class' because there is no way to assign further children to it. It sounds OK to me.

  • @facundorodriguez92
    @facundorodriguez92 7 лет назад +4

    Hello Christopher,
    I would like to know if there is a possibility that you dedicate any video to the concept of TDD. I am beginning to immerse myself in that subject and I would like to know your opinion about it.
    Thank you very much.
    Saludos desde Argentina!

    • @facundorodriguez92
      @facundorodriguez92 7 лет назад +3

      Sorry I should have done a search before suggesting. For those interested here speaks of similar concepts:
      ruclips.net/video/zatcvoNqSaI/видео.html

    • @ChristopherOkhravi
      @ChristopherOkhravi  7 лет назад +3

      Nice! You were pretty quick to find it though :) :) Lemme know if you find anything specific in the videos that you would like me to explore further in future videos. Also, thank you very much for suggesting topics and thank you very much for following the channel 🙂

  • @prolamaamvs6952
    @prolamaamvs6952 Год назад

    deam this dude is going crazy :D love it

  • @Tall-Cool-Drink
    @Tall-Cool-Drink 6 лет назад +1

    lol.....I glad I'm not the only one confused by "part-whole"......I'm confused by many phrases like this throughout software coding methods.....

  • @tarike9808
    @tarike9808 2 года назад

    God bless you man

  • @BrunoOlivera22
    @BrunoOlivera22 3 года назад

    my man!! great vids n explaining, much appreciated!!

  • @AshokKumar-uf5nj
    @AshokKumar-uf5nj 5 лет назад

    Hi @Okhravi, Super likes the series. But I don't see the Builder and Chain of responsibility patterns covered in the playlist. Can you point me to these if you have covered ?

  • @SoferPeOZN
    @SoferPeOZN 3 года назад +1

    16:07 Didn't see that coming

  • @rajsoni7085
    @rajsoni7085 Год назад

    thanks for making this video .

  • @djordjedozet8585
    @djordjedozet8585 6 лет назад +1

    Oh man, too detailed example, we understand it :D I had to rewind forward 15 mins xD Anyway, good job man! Keep up!

  • @nawakoff2581
    @nawakoff2581 2 года назад

    I understand it is all about mutability, but wouldn't it be more flexible to create just one class and determine whether it a leaf or a composite based on whether it contains subitems or not at all? Of course, it would force us to use a conditional, but it seems to be more like a composition over inheritance

    • @nawakoff2581
      @nawakoff2581 2 года назад

      But yes, I guess it depends on the specific case, whether we need to wrap composites into new ones without altering the first ones, or we will know the entire structure and just use constructor, or we need to extend different nodes dynamically

  • @moathnaji8505
    @moathnaji8505 5 лет назад

    thanks for the big effort its really clear, but i need to ask where the TodoList come from ?

  • @hagergamal2856
    @hagergamal2856 2 года назад

    Great video 👍
    Can u talk more about mutable

  • @BangsarRia
    @BangsarRia 4 месяца назад

    GoF intends that the Composite Pattern be used in cases that the Client does not have to distinguish between Nodes and Leaves.
    GoF p167, point 4 expressly addresses the issues of ISP and LSP: "trade-off between safety and transparency".
    GoF's use of "transparency" here makes me uncomfortable, because I don't think they mean that at all, and the word does not appear in the index, so we don't know what they mean by it. In this context I think they mean "uniformity", or even "abstraction".
    While we're talking about terminology, GOF was published before Java was revealed. So we see "operation" for "method" throughout. They might have gone with "function" instead of "method" anyway, as not all languages use "method" and "member" etc as terms.

  • @piotrjaga6929
    @piotrjaga6929 Год назад

    that is awesome! thank you

  • @shinemperor8950
    @shinemperor8950 5 лет назад

    Loving this series. Thank you for this. I during the video you mention something about refactoring, branching logic and polymorphism. Was this video already made? (I haven't gone through all your content yet) Because I find the idea of replacing branching logic with polymorphism absolutely fascinating.

  • @danielkapitanov1816
    @danielkapitanov1816 6 лет назад

    you're a life saver

  • @feosys7695
    @feosys7695 5 лет назад

    man, its awesome channel, thank u

  • @ribaker822
    @ribaker822 5 лет назад

    Hey Christopher, thanks again for this video. On your point on Interface Segregation Principle, while I agree with you, I thought that Leaf was not a client of Component, but actually is a component. Or maybe it's me not fully understanding the ISP?

  • @codenamesubho
    @codenamesubho 6 лет назад

    @christopher, I am confused. Doesn't decorator pattern code look the same? you add some functionality and pass the request to the successor decorator untill you reach the terminating decorator?

    • @codenamesubho
      @codenamesubho 6 лет назад

      oh there is another video for that :)

  • @premodial5222
    @premodial5222 5 лет назад

    love the video , they are great ,. but may you also please make shorter videos like 5min summarizing everything thank you

  • @HarshKumar-zo9kz
    @HarshKumar-zo9kz 3 года назад

    Can you create the video on chain responsibility,visitor,mediator pattern?

  • @khoinguyen-ft2ys
    @khoinguyen-ft2ys 3 года назад

    Thanks!