Command Pattern - Design Patterns (ep 7)

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ต.ค. 2024
  • Video series on Design Patterns for Object Oriented Languages. This time we look at the Command Pattern.
    💙 BUY MY BOOK:
    leanpub.com/th...
    ► The playlist
    • Design Patterns in Obj...
    ► Head First: Design Patterns
    geni.us/nlbA6
    ► Design Patterns: Elements of Reusable Object-Oriented Software
    geni.us/PsXmo
    TALKS MENTIONED
    ► Gary Bernhardt - Boundaries
    • Ruby Conf 12 - Boundar...
    PRODUCTS MENTIONED (Not paid endorsement but affiliate links)
    ► Philips Hue (Starter Kit)
    geni.us/ejJX
    I recommend buying more lightstrips than light bulbs :)
    💪 Patreon Community
    / christopherokhravi
    📚 Products I Recommend
    geni.us/71ZXF

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

  • @Mikenight120
    @Mikenight120 ปีที่แล้ว +23

    2023 and still one of the best Design Pattern Playlists.

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

    Your design pattern playlist is one of the best explanations about patterns ever. The last video of this playlist is over 4 years old and there are many patterns left (visitor, chain of responsibility, flyweight, builder, etc.). Are there any plans to cover these ones? It would round this awesome playlist more up :)

  • @AbhishekKumar-xh6pi
    @AbhishekKumar-xh6pi 7 ปีที่แล้ว +141

    In my youtube browsing career of 9+ years,this is the first channel/video where I am commenting and liking.
    You really deserve this.Hats off to you Christopher Okhravi

    • @ChristopherOkhravi
      @ChristopherOkhravi  7 ปีที่แล้ว +12

      Thank you for sharing. I very much appreciate you taking the time to punch out that comment. I am humbled.

  • @AlfW
    @AlfW 4 ปีที่แล้ว +92

    Student: Can we do this one by one?
    Christopher: Yes, let's do it one by one by one by one.

  • @RajivKumar-qj9nw
    @RajivKumar-qj9nw ปีที่แล้ว +9

    It's been more than 5 years for this video yet no one has ever touched your level of explaining things. Simply a gem. It's high time now , please make more such videos.

  • @timothyjohns8775
    @timothyjohns8775 6 ปีที่แล้ว +136

    At around 25:20, Chris mentions that command pattern is similar to strategy pattern, and he wasn't sure what the technical difference was. To me, the difference is that in the strategy pattern, the object that gets passed around is an algorithm (i.e. HOW to do something). On the other hand, in the command pattern, the object that gets passed around is a command (i.e. WHAT to do).
    For example, let's say we have a list of elements. If we already know that we want to sort the list, we might use the strategy pattern to determine how to sort the list. On the other hand, we might use the command pattern to determine what operation to apply to the list, such as to sort the list, or to add an element, or to remove an element, etc.

    • @ribaker822
      @ribaker822 5 ปีที่แล้ว +6

      I agree with this. And I see how the Command can then use the Strategy pattern within itself, to "execute" and "unexecute" depending on what that is.

    • @professorfontanez
      @professorfontanez 5 ปีที่แล้ว +23

      Well... in the simplest of terms, both are encapsulating BEHAVIORS. In one context (Strategy), you calling the behavior ALGORITHMS, and in this context (Command), the algorithm is the message or command. The only difference I see is that, for Strategy there is no requirement to undo something that was done in the past. You could say that the Command Pattern is an EXTENSION of the Strategy Pattern.

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

      I kinda agree with Professor F here. Command Pattern just feels like Strategy Pattern with an Undo operation.

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

      I can also see that a subtle difference might be the way the client (Invoker in this case) is using the commands. For instance the order of commands generally matters, so the Invoker would keep track of the commands if they wanted to Undo commands in the order of which they were last executed. While in the Strategy Pattern, clients typically do not need to maintain a collection of strategies where order matters. Of course this is all depending on the scenario. Of course you could create composite hierarchies for both commands and strategies, and then again commands can contain a strategy. So it really all depends on the scenario, but I think in the simplest example we are keeping track of what to either do or undo in relation to the order in which the commands were executed.

    • @TooNDeMentIa
      @TooNDeMentIa 4 ปีที่แล้ว +8

      Strategies aren't really meant to be passed around, stored, sent over the network, reversed etc. Commands are.
      It's the data the command contains, sometimes just the command itself, that defines _what_ should be done and the execute function defines _how_ it should be done.

  • @Bigboi0330
    @Bigboi0330 7 ปีที่แล้ว +262

    You deserve more subs man. One of the few people I can actually stomach when talking and design patterns.

  • @MichaelKire
    @MichaelKire 4 ปีที่แล้ว +11

    I wish I had these videos back when I studied CS.
    You show off everything about the patterns. The What, the How and the Where. Some of these patterns I fully understand now, 8-10 years later.

  • @ivanbartolelli
    @ivanbartolelli 5 ปีที่แล้ว +7

    I'm from Argentina, and I'm studying Information Systems Engineering , and in systems design subject my partners and me are studying Desing Patterns. Your explanations are great for us. Thanks a lot!

  • @FlipYourLearning
    @FlipYourLearning 3 ปีที่แล้ว +11

    Wonderful! I'm trying to learn to program and I was deferring learning about design patterns because they seemed too complicated. Your videos have changed my mind and I am managing to understand every single one of them.

  • @SpoderSuperhero
    @SpoderSuperhero 3 ปีที่แล้ว +9

    THis is really, really good content. I love how you discuss your own opinions on how these patterns are constructed.

  • @Bl0ck3dz
    @Bl0ck3dz 5 ปีที่แล้ว +66

    21:09 you alright my man? :D

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

    Trough out the years i always come back to this channel when it comes to patterns. Noone explains it close as well as you do. Thank u alot

  • @praneetgupta5121
    @praneetgupta5121 7 ปีที่แล้ว +5

    I studied few patterns from your video only and they were asked in an interview...followed your style of explaining the patterns and I got selected..thanks man. Your knowledge inspires and motivates me to learn more. ✌

    • @Anonymous-vd1pb
      @Anonymous-vd1pb ปีที่แล้ว

      Normie

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

      ​@@Anonymous-vd1pb that's a normie making big $$$ in tech

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

    I could listen to you talk about Design Patterns forever!

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

    I was really struggling to wrap my head around this one, just because there is a lot of verbiage thrown around very quickly, making it hard to latch onto anything in every other explanation. I really needed the time you took to break out down, rephrase sentences, etc. It's much simpler than everything else made it seem! Thank you so much for making this!

  • @simondavis1303
    @simondavis1303 3 ปีที่แล้ว

    Another example would be building a calculator:
    We have multiple Commands: Add, Subtract, Multiply, Divide, Redo, Undo
    We have a Calculator which has buttons that invoke these commands.
    Then our receiver which is the display, shows the results of those commands.
    I'm loving these videos! Starting to see the world in a brand new way! Thank you so much!

  • @jeanahollings
    @jeanahollings 6 ปีที่แล้ว

    Thank you! Thank you! Thank you! I am an auditory learner which is a very serious challenge to learning programming. I've read the books, read the sites, and watched a few other videos to try to understand this pattern to no avail. Within 5 minutes of watching this I understood more than all those other resources combined. Don't change a thing! I know visual learners may not appreciate your work the way I do but I also know that the resources out there are hand made for them.

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

    Спасибо большое Christopher. У тебя хорошо получается объяснять такие сложные темы простыми примерами из жизни. Как раз то что я искал. Удачи тебе.

  • @TheVoltarus
    @TheVoltarus 3 ปีที่แล้ว

    Videos like yours make me wonder why I even bother with most of my uni classes where the explanations are often unclear.
    This is so well explained and it probably saved me a few hours of studying. Thanks!

  • @MazDTdK
    @MazDTdK 3 ปีที่แล้ว +6

    Christopher in 2017: One half is the office part and other half is the leisure part of your room.
    2020: Yes

    • @almahdc
      @almahdc 3 ปีที่แล้ว

      haha :(

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

    A more frequent variant of the Command Pattern, which is more prominent in business application development, is one which implments the methods `canExecute()` and `execute()`. For example if you have a UI with context buttons. Each button holds the action of a particular item in the menu and whether it can be executed. And according to the canExecute state the item is either greyed-out (not pressable) or active and ready to be pressed.

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

    I've been watching 20+videos these days to get this pattern, this is the one that made me understand what it is !!! thank you so much

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

    This is the super easy to grasp man.... I'm watching this now, after learning Design patterns before 10+ years back.. I worry, I didn't have TH-cam and videos like yours in those days.

  • @tivmego
    @tivmego 7 ปีที่แล้ว +22

    I knew you won't fail us man! I was waiting for the next one since the last dp video :)

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

    Spent 30 seconds on this and immediately Subscribed.

  • @muho121
    @muho121 7 ปีที่แล้ว +62

    Great explanation! I have been watching this series and so far this one is the first to make me actually laugh out loud :D 21:09

    • @ChristopherOkhravi
      @ChristopherOkhravi  7 ปีที่แล้ว +22

      Heheh :) It was actually worse but I felt too much like a buffoon and had to cut the rest of the fall out :D

    • @SaravanaKumar-nl4sz
      @SaravanaKumar-nl4sz 7 ปีที่แล้ว +8

      Once this entire patterns episode done. You could post that videos as bloopers :P

    • @Ivo68
      @Ivo68 6 ปีที่แล้ว +5

      he just showed the feature of redo. "so the command ..." redo() "so the command..."

    • @MathP3r
      @MathP3r 4 ปีที่แล้ว

      @@Ivo68 HAHAHHAHAHHAAHA

  • @ravi-thestar8501
    @ravi-thestar8501 5 ปีที่แล้ว +1

    great work bro.. I am an experienced developer without much knowledge on design pattern. I tried many tutes, but yours is the best. thank you very much

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

    I'm new to design pattern and at the end I was like, "yoooooooo!!! This is amazing!!! Where do I start 👀👀? “ Your episodes on these are awesome. I love how you explain these in several examples and in different view points along with real world applications and most of all the example of code. This is how I learn and I wish I had someone to explain things to me in the way you do. Thanks 😉👌👍👍

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

    I'm pretty late to comment, but just saw these videos. WONDERFUL! one of the best I've even come across. Thank you so much Sir.

  • @sayalithange9231
    @sayalithange9231 5 ปีที่แล้ว +4

    You are just awesome....I'm very new to design patterns...and this video really helped me understand...Thanks alot...😊😊

  • @ozziekhoo
    @ozziekhoo 3 ปีที่แล้ว +3

    I am about to start my next semester learning all these patterns. Thank you for covering them! Also 21:10 was seriously hilarious! You're comedic skills are on point!

  • @Laralamberts
    @Laralamberts 5 ปีที่แล้ว +4

    you ll most likely make me pass my exams with these clear explanations! Thank you

  • @dhruvachandra8210
    @dhruvachandra8210 6 ปีที่แล้ว

    Please complete all design patterns not only the ones covered in Head First Design Patterns, but your videos are also so good I really love these design pattern videos a lot

  • @chrisjust7445
    @chrisjust7445 7 ปีที่แล้ว +23

    Regarding the Undo & Redo via the Command pattern, you would have 2 stacks. When you perform an action you push it onto the Unto stack and clear the Redo stack. If you undo something you pop it off the Undo stack, undo it, and push it onto the Redo stack. If you redo something you pop it off the Redo stack, do it, and push it back onto the Undo stack.

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

      +Chris Just Thanks for the clarification! Excellent idea. Makes perfect sense. That would be much easier than using an index variable that keeps track of where we are in the "undoing" which is kind of what I was alluding to. Thanks again and thanks for watching :)

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

      I'm not convinced that Command Pattern would be a good tool for implementing a undo/redo functionality. I'd rather use immutabe state objects and store older instances in an undo list. You'd have some memory overhead but you wouldn't have to actually calculate undo and redo. Instead you just link to a different state.

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

      @@ChristopherOkhravi Photoshop and most similar software use the state machine to manage workflows and the command pattern is one component of it. I am not 100% sure, but they use a single "stack" because it represents the "state" and can be rolled back and forward.
      If you are really curious, check parametric modeling.
      Thanks a lot for your videos, they are superbly helpful!

    • @ChristopherOkhravi
      @ChristopherOkhravi  5 ปีที่แล้ว

      @@shobhit0shri Very interesting! Thanks :)

    • @dimatrushin8516
      @dimatrushin8516 5 ปีที่แล้ว

      ​ Christopher Okhravi ​, ​ Shobhit Shrivastava , ​ Tekay37, There is a talk by Sean Parent (the guy behind the Photoshop) called ``Run-time Polymorphism...'' where he explains the undo/redo model of Photoshop. They make some kind of copy of each state. Just watch the video, he demonstrates all the crazy things you can do, like slightly modifying one operation somewhere in the history without rolling back to that operation. He also explains how you achieve such kind of things.

  • @bryanexcell3751
    @bryanexcell3751 7 ปีที่แล้ว

    I really want to say thank you so much. I don't learn from just reading books very well but I can learn great from fantastic lecturers such as yourself. I've actually read this book but my understanding of design patterns has increased so much from your videos. Thank you. Really I mean it, thank you so much. You have helped me become a much better developer.

  • @atul121984
    @atul121984 6 ปีที่แล้ว

    I am impressed by the way you make us understand 'Design patterns'. Thanks a lot Christopher Okhravi

    • @ChristopherOkhravi
      @ChristopherOkhravi  6 ปีที่แล้ว

      Not a problem. I’m glad to have been useful :) Thank you for watching and for your comment :) :)

  • @danielgallegosibarra7169
    @danielgallegosibarra7169 7 ปีที่แล้ว

    I built an AT Command Builder in order to build specific routines to program a network module. I didn't know that was a design pattern. My head exploded with this awesome video! :) Thank you, Christopher! amazing videos!

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

    This was so good I feel genuinely mind-blown! The command pattern is crazy powerful

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

    Thanks, Christopher, it was a wonderful explanation. I have started this Design Patterns playlist a few days ago and I got addicted to it as you made them so easy to understand.

  • @jackwesleymoreira
    @jackwesleymoreira 3 ปีที่แล้ว

    Man I'm really amazed with this explanation!! Mind blowing!!! If I could put all my former university teachers to give a class like that, they wouldn't be capable to do it... Congrats Christopher, you are doing an amazing work...

  • @kevinbenavides92
    @kevinbenavides92 6 ปีที่แล้ว

    Thank you Chris. I was afraid of tackling design patterns as a self taught but you have made this portion of the journey so much easier. Keep going man. Your amazing!

  • @hernan4485
    @hernan4485 5 ปีที่แล้ว +4

    thanks man really helped me out. Really chill way of explaining things

  • @boburirgashev4762
    @boburirgashev4762 3 ปีที่แล้ว

    You saved my life. Thank you for the series on design patterns. You are really good at explaining things

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

    Hey Christopher, I'm new to C# and wanted to say a huge thanks for this video, its entertaining as well as educational - I can now follow some code at work and understand better - top job my friend !

  • @amisorvoja6443
    @amisorvoja6443 5 ปีที่แล้ว

    I really appreciate this series. I prefer this before any other series in Netflix 😎 You make me laugh loud and in the same time give me understandable patterns ✌🏽

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

    you definitely are the best lecturer/teacher I have ever seen .... so brilliant

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

    Only of the super rare videos that I watch at normal speed, which tells you a lot. :)

  • @sankait3036
    @sankait3036 3 ปีที่แล้ว

    Was struggling with the Command pattern until I found your video, very clear explanation. Thank you so much!

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

    Love your videos and way of explaining it. I have confidence that now I can also learn design patterns.

  • @gonzaloibarsingman7379
    @gonzaloibarsingman7379 7 ปีที่แล้ว

    A crystal clear explanation, well done! Videos length don't matter when video is rich in content

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

    Wondeful series of videos, it's the first one that I follow that makes me want to rediscover design patterns :-)
    IMHO the big difference between the Command pattern and the Strategy pattern is :
    - Command pattern : the invoker exposes a set of commands that can be used by a client, ie: myObject.MyCommand.Execute(), in this case the contract is between the client and the command
    - Strategy pattern : the object that contains strategies exposes methods that are then delegated to strategies, ie: myObject.DoSomething(...), in this case, the contract is between the client and the object, the client never calls directly the strategy
    In the example, the Click... methods should not exist, they actually represent the action of the user pushing on the button, otherwise, it's exactly the same as the strategy pattern ;-)
    Hope this helps.

  • @walterdiaz2003
    @walterdiaz2003 3 ปีที่แล้ว

    I remember watching these videos in 2017 for school and interviews. It helped me to get into an Ivy League university.

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

      I’m very happy to hear this. Congratulations and kudos to you for your hard work.

    • @walterdiaz2003
      @walterdiaz2003 3 ปีที่แล้ว

      @@ChristopherOkhravi Thanks for your content. Great job!

  • @steffenlolzz3583
    @steffenlolzz3583 8 หลายเดือนก่อน

    I have an exam tomorrow about all the design patterns you helped me a lot!

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

    Amazing video series. I'm currently reading the book of Head First, preparing myself to the Master Architect of Java and I found your videos like the perfect complement to the reading. Thanks a lot. By the way I did send you a connection request on LinkedIn

    • @ChristopherOkhravi
      @ChristopherOkhravi  7 ปีที่แล้ว

      +Ernest Barroso Cabeza Nice! Best of luck with the Master Architect! Thank you very much, I'm glad the videos work as a complement :)

    • @ChristopherOkhravi
      @ChristopherOkhravi  5 ปีที่แล้ว

      @livestupid thinkbrilliant Sorry, I'm not sure I understand what you mean? :/

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

    I like your way of teaching. Thanks a ton for making things simpler. You rock!!

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

    21:10 scared the shit out of me I thought someone in my room fell. Also: you should make videos again! I've been watching quite a few of your design pattern videos the past week and I've really been enjoying them.
    I think the same kind of videos but with data structures and algorithms would be super super cool!

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

    Your way of teaching is simply superb! :D Keep up the good work! :)

  • @truenerdofbotva5831
    @truenerdofbotva5831 4 ปีที่แล้ว

    I'd say that the main differece between command and strategy patterns is that strategies are passed upon construction, while commands are passed on the go. When you changed Invoker class to accept commands on construction, you effectively shifted from command to strategy pattern. IMHO.
    Thanks for the great video!

  • @neval7512
    @neval7512 7 ปีที่แล้ว

    Now I don't need to get bored with the book.I get the point fast and furiously:) OK, I play the video in 1.5x speed sometimes, but you've done a GREAT JOB here. Thank you!

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

    this is so very enjoyable, I am having a great time reading this book and watching your videos. thanks!

  • @KishoreKumar-pf8ku
    @KishoreKumar-pf8ku 3 ปีที่แล้ว

    Best series on Design Patterns. Binge-worthy. Thanks a lot.

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

    After watching this video I went smart home 🤣
    Excellent video as usual. The Hue control is a fantastic real world example!

  • @mrrule8311
    @mrrule8311 6 ปีที่แล้ว +5

    Second time i watch this. Great explanation and real example !! :) Like i heard good material always should be inspected twice, because you want to get all information clear.

  • @MyroslavOhorodnyk
    @MyroslavOhorodnyk 5 ปีที่แล้ว

    A great approach to explanation, MR Okhravi!
    Thanks for the video!

  • @MrPDTaylor
    @MrPDTaylor 5 ปีที่แล้ว

    Thanks so much for this video. I just started working through Head First Design patterns and you are helping me expodite the process (I'm not a big fan of reading to learn programming simply because audio is more efficient)

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

    When they print a new edition of the book they should reference to this series :)
    Very well explained. Like the way you present the topics. Respect.
    Can't wait for the next one...

  • @balajim6628
    @balajim6628 5 ปีที่แล้ว

    Very well explained. Able to understand the command pattern with clarity. Thanks a lot.

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

    The beginning of these videos always makes me giggle with that goofy entry of yours 😂😂

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

    Talking about undoable commands is very similar to saga pattern, where you chain list of transactions that needs to be executed but also maintaining list of transactions that can rollback at any point if some transaction (command) fails.

  • @viteok1234
    @viteok1234 7 ปีที่แล้ว

    Nice explanation, thank you for sharing with book titles in order to study it thorougher .

  • @harikrishna3656
    @harikrishna3656 7 ปีที่แล้ว

    superb, simple, easy explanation. clearly understood the concept.

  • @omotola9521
    @omotola9521 6 ปีที่แล้ว

    Thank you very much been tryna understand this command but I feel this is the first time I actually got a good hang off it plus I think i am more likely a visual learner

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

    Another excellent explanation of design patterns. Thanks for these videos. By the way that 21:09 was amazing. I just rolled back to see that again :)

  • @indramaniarora7901
    @indramaniarora7901 4 ปีที่แล้ว

    Best series on design patterns on youtube

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

    Thank you for the amazing video series -:) This was pretty awesome.Having said that,i felt the way this scenario was implemented in HeadFirst book(using setCommand method to map a particular slot to an implementation of ICommand interface) seemed a bit better /made a bit more sense

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

    Thank you so much for all your videos. They are VERY helpful along with reading the book

    • @ChristopherOkhravi
      @ChristopherOkhravi  7 ปีที่แล้ว

      +Callerooo Thank you. I'm glad to hear that the videos help support the literature :) Thank you for watching and for commenting! :D

  • @pw.70
    @pw.70 ปีที่แล้ว +1

    "Wi-Fi connected coffee machines?" - I'd never let my wi-fi drink my coffee!

  • @demonspawn5967
    @demonspawn5967 4 ปีที่แล้ว

    Your videos are great! They got me an A in my programming exam about Design Patterns :D! Well explained, easy to follow, and entertaining. Thank you

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

    The kapuuusshh always gets me after the definition.

  • @roman8745
    @roman8745 7 ปีที่แล้ว

    i just turned off my adblock, it's great work. i am replaying this patterns playlist twice. first - just watched, now - i'm noticing all this UI diagrams and code on paper) at one time improving my english level. universities with teachers, whose explains like you - would create great future, but not this time) now university the greatest useless thing. thanks for videos. greetings from ukraine

  • @ianjamiesonmusic
    @ianjamiesonmusic 7 ปีที่แล้ว

    What a guy offering this advice for free!

  • @jakubczechowski1159
    @jakubczechowski1159 3 ปีที่แล้ว

    For me this series is extremely useful. Thank you!

  • @tarunsharma6455
    @tarunsharma6455 7 ปีที่แล้ว

    Waiting for next one ........ From a week.
    Thanks dude. I am able to finish half book in week. Really admire your work

  • @craiglehn
    @craiglehn 5 ปีที่แล้ว

    Thank you man, never had time to finish reading this, book and yeah, you explain it will enough that I can follow and not trail off.

  • @saudnaeem
    @saudnaeem 6 ปีที่แล้ว

    you have got great teaching skills. carry on the good work. God bless you

  • @Karjanos
    @Karjanos 5 ปีที่แล้ว

    Thanks for sharing your pack of information. It does help us a lot.
    You helped/taught me with perception of information.

    • @Karjanos
      @Karjanos 5 ปีที่แล้ว

      Thanks for a super video.. :)

  • @suryakantsharma6761
    @suryakantsharma6761 5 ปีที่แล้ว

    Awesome work. After wikipedia I don't understand until watch full video.

  • @mishamovdivar
    @mishamovdivar 7 ปีที่แล้ว

    Please continue the series man. great explanations.

  • @ashutoshpareek2501
    @ashutoshpareek2501 7 ปีที่แล้ว +3

    I implemented the command pattern a while back in my application with a slight variation then what you told us in the video.
    I had to execute thousands of commands in a multiple batches. The thing which is different between my situation and your example is i need to know if my command did what it suppose to do and if it failed where did it fail.So if command was suppose to do multiple task (T1 to T4) to complete one single task (T) and if it fails on T3 (in my case 99.999 % of times it only happens because of network issues) i need an return code 3 which indicates that it failed at T3.
    So in my case unexecute/undo was to undo the task T1,T2 and T3, so i can start fresh command.
    Mind you that in this case commands are third party (Windows/Linux)...so changing them is not in my hand.
    I think we can use undo/Unexecute also to partial rollback the work done and do a fresh start in feedback dependent applications

  • @experimentalhypothesis1137
    @experimentalhypothesis1137 4 ปีที่แล้ว

    best series on patterns online

  • @tymofiidmytrenko3418
    @tymofiidmytrenko3418 4 ปีที่แล้ว

    I think at 22:48 it would be more accurate to say that we are encapsulating something that uses different interfaces into something that can be represented with the same interface. I think this is the whole point of command pattern. We de-couple Invokers from Receivers through this middleware API with standard interface. By doing this, we minimize the maintenance required on the Invoker code and simplify future extension of the functionality.

  • @walters19801
    @walters19801 5 ปีที่แล้ว

    Very clear!! it was a great lecture! Now Im gonna go straight to intelliJ and write some code for command pattern...

  • @kshayk0
    @kshayk0 5 ปีที่แล้ว

    Not sure if it's already mentioned, but i think it's better if in the invoker we actually specify the type of command we want to get in the constructor parameters instead of the interface, because we are saving and using those classes in a strict way, so if we pass the classes in the wrong order we might face some errors or bugs.
    Other than that, great video as usual! thanks

  • @augusto2581
    @augusto2581 4 ปีที่แล้ว

    Great Explanation Christopher! Thank you very much for this video!

  • @neolynxer
    @neolynxer 7 ปีที่แล้ว

    Ye-as! Finally! A pattern no one can properly explain explained by you! Awesome stuff, man.

  • @TheSagarSai
    @TheSagarSai 6 ปีที่แล้ว

    Best explanation I have come across. Hope you do similar videos for Head First OOAD book as well.

  • @SureshKotha
    @SureshKotha 3 ปีที่แล้ว

    Excellent way of making people understand "Command" pattern. And I enjoyed your antics aswell :-)

  • @srikanthpanda7724
    @srikanthpanda7724 6 ปีที่แล้ว

    You really rock man ! . Excellent clarity in concepts and ability to communicate it in simpler techniques . Please publish some vedios on AI and stuff as well.

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

    Thank you for this film and every other. Great job 😊