Тёмный

31. Design Undo, Redo feature with Command Pattern | Command Design Pattern| Low Level System Design 

Concept && Coding - by Shrayansh
Подписаться 129 тыс.
Просмотров 19 тыс.
50% 1

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 76   
@prafullaingole6122
@prafullaingole6122 Год назад
One thing I like about you is that you try your best to give attention to all the posted comments/questions. Other youtubers just ask audience to like and subscribe.
@theunusual4566
@theunusual4566 10 месяцев назад
Thanks for the video. The Undo Operations needs to be clearly explained by Interviewer, as Undo May mean not just Inversion of Last Operations But also Performing the Operation that was prior to current operation. Example : Turn AC on SetTemp Undo So at last Undo might refer to revert of last Operation i.e. set Temp and hence implementation could change as per this.
@vishalghanghav748
@vishalghanghav748 Год назад
LLD and HLD is soo interesting because of you 🙃 .Happy Coding
@ConceptandCoding
@ConceptandCoding Год назад
Thanks
@dhaanaanjaay
@dhaanaanjaay 8 месяцев назад
It will make more sense to accept command as method argument in MyRemoteControl instead of constructor arg otherwise every time I need to execute a method(command) I need to create 2 extra objects ie 1 MyRemoteControl 2. Command.
@tejasshaha6629
@tejasshaha6629 Год назад
Very nice video sir ❤ I guess Doubly linked list is more helpful here in case of remote control buttons. Can insert from rear end and remove from front end or rear end only as per requirement. Thanks again !!
@ConceptandCoding
@ConceptandCoding Год назад
Yes buddy make sense
@tejasshaha6629
@tejasshaha6629 Год назад
​@@ConceptandCodingIf possible sir could you please make all structural design patterns in 1 video and all behavioral design patterns in 1 video please ?
@ConceptandCoding
@ConceptandCoding Год назад
@@tejasshaha6629 yes it's in my bucket list
@tejasshaha6629
@tejasshaha6629 Год назад
@@ConceptandCoding Thank you sir
@RaviShankar-rj9xq
@RaviShankar-rj9xq 11 месяцев назад
Thanks for the great explanation! I have one query If we want to also provide the setTemperature(int temp) to the client, I can think of 2 solutions: 1. Have one more method execute(int temp) in the command interface to support the setTemperature(), but TurnACOffCommand and TurnACOnCommand will have to unnecessarily implement the execute(int temp) method. 2. Have one more command interface which will have execute(int temp) and the SetTemperatureCommand will implement this interface while the existing TurnACOffCommand and TurnACOnCommand will implement the first command method. What should be the ideal solution for this usecase?
@theunusual4566
@theunusual4566 10 месяцев назад
Same thought. ChangeTempCommand class ( new one) will also have have undo method, and it would retain Last Temp Values Set, so when undo is called, It can ask AC to Increase or Decrease Temp based on retained temp data.
@shubhamtripathi4
@shubhamtripathi4 Год назад
Will using DLL make more sense in place of stack - as we have no control over size of stack; with DLL we can insert commands from one side and remove commands from the other side ( if undo DLL size grows beyond initial capacity, let’s say we only want to store last 5 commands) ?
@ConceptandCoding
@ConceptandCoding Год назад
Make sense
@piyushpathak1186
@piyushpathak1186 8 месяцев назад
target I am setting for myself for this year to complete is your lld+ hld + java + springboot videos with coding practice and complete the head first design pattern and clean code books (2 times minimum)
@ConceptandCoding
@ConceptandCoding 7 месяцев назад
good luck piyush
@dhaanaanjaay
@dhaanaanjaay 8 месяцев назад
For undo redo, isnt memento pattern more suitable?
@arindamsarkar5543
@arindamsarkar5543 Год назад
thanks for resuming the lld series
@ConceptandCoding
@ConceptandCoding Год назад
:)
@shrutimath3330
@shrutimath3330 Год назад
Thanks for great content .Appreciate your efforst👍👍🙏
@ConceptandCoding
@ConceptandCoding Год назад
Thanks
@harshverm776
@harshverm776 3 месяца назад
Best Explanation !!!
@AkashJadhavIT
@AkashJadhavIT Год назад
I love LLD more than HLD, Keep LLD coming
@ConceptandCoding
@ConceptandCoding Год назад
Sure
@namandave5685
@namandave5685 Год назад
try to tell beforehand what you are actually building so we can check what is wrong with the given solution at an early stage.
@ConceptandCoding
@ConceptandCoding Год назад
Sure buddy
@manishv.8167
@manishv.8167 Год назад
Great explanation 🎉
@ConceptandCoding
@ConceptandCoding Год назад
Thank you
@swapnajitpanda5841
@swapnajitpanda5841 Год назад
Recently you have changed the notepad . Which is this android or iPad . Looks nice. Please suggest me . I want to use for note taking.
@ConceptandCoding
@ConceptandCoding Год назад
For notes, you can use Zoho notebook, else Microsoft OneNote
@swapnajitpanda5841
@swapnajitpanda5841 Год назад
@@ConceptandCoding i was asking about the pad you are using in videos for writing. Please can you suggest
@ConceptandCoding
@ConceptandCoding Год назад
@@swapnajitpanda5841 pls check the first video of this channel. I am using wacom pad
@santoshbhatnagar2155
@santoshbhatnagar2155 Год назад
I guess it can be done by facade design pattern as it provides a simple interface to the client
@ConceptandCoding
@ConceptandCoding Год назад
Same but one is behaviour pattern and another is structural. So even though their solution looks same but the intention is different
@arnavsatrusal2480
@arnavsatrusal2480 8 месяцев назад
Great work ❤
@ConceptandCoding
@ConceptandCoding 8 месяцев назад
Thanks
@vishalmate
@vishalmate Год назад
Hye Shreyansh, I saw your LLD video for vending machine where we are using State design pattern, in that you have mentioned if the system has states we should use state pattern, can't we use the same pattern here? Also can you please upload a video on difference between State vs Strategy vs Command design pattern?
@ConceptandCoding
@ConceptandCoding Год назад
Why you think state and command pattern are same? Pls elaborate more Vishal
@vishalmate
@vishalmate Год назад
Since you have used it to design air-conditioning system, ideally we should use state design here, correct me if I am wrong.
@vishalmate
@vishalmate Год назад
I think text editors are best example where we can use command design pattern, where undo and redo features make sense. Again please correct me if I am wrong as have started learning LLD recently and you are more experienced in this field.
@ConceptandCoding
@ConceptandCoding Год назад
@@vishalmate ohh got it. Yes. Changing the State from On to Off. Make sense, we can also design air conditioner behaviour using state design pattern. And you also try to implement it using state design pattern.
@vishalmate
@vishalmate Год назад
Thanks to you, for all your efforts that you are putting to create all the content. I can imagin how much time and efforts are require to create a single video from preparation, coding, video recording and editing. Thanks again.
@mr.dependable4885
@mr.dependable4885 Год назад
Hi there, i am final year undergrad preping for placements , can someone please tell what is expected in design rounds, i mean is it solely focused on LLD or HLD or both (for fresher roles)
@ConceptandCoding
@ConceptandCoding Год назад
HLD is not that much imp, but LLD is
@PranayDatta
@PranayDatta Год назад
what about set temparature command, or where user input is needed. how to handle these commnads ?
@ConceptandCoding
@ConceptandCoding Год назад
Appropriate datastructure can be used, to store the object
@soumalyasahoo2664
@soumalyasahoo2664 Год назад
Thanks for the video.
@ConceptandCoding
@ConceptandCoding Год назад
Thanks
@RinayraMotwal
@RinayraMotwal Год назад
Great work👍👍👍
@ConceptandCoding
@ConceptandCoding Год назад
Thank you
@yuvhrajverma6158
@yuvhrajverma6158 11 месяцев назад
sir whats the role of invoker apart from applying undo feature like if we don't want undo feature then client already has reference to command and the receiver so client can directly call commands execute method and still there is no tight coupling between client and receiver plz reply sir
@ConceptandCoding
@ConceptandCoding 11 месяцев назад
ack of the question
@TheRajnoida
@TheRajnoida Год назад
Note not there give link not working 😢
@ConceptandCoding
@ConceptandCoding Год назад
Let me check tonight buddy, i will update the link. Thanks for updating me.
@TheRajnoida
@TheRajnoida Год назад
@@ConceptandCoding Sir, still have't uploaded yet
@ConceptandCoding
@ConceptandCoding Год назад
pls check now, i have updated the description section: notebook.zohopublic.in/public/notes/u3i1s7022b343ebda42819272312415abb520
@TheRajnoida
@TheRajnoida Год назад
@@ConceptandCoding Huge thx
@aravindkumarn1776
@aravindkumarn1776 Год назад
This is similar like strategy design pattern
@antrapurohit8010
@antrapurohit8010 Год назад
I agree. Different strategy to implement different command
@rv0_0
@rv0_0 Год назад
Are you still adding videos to this playlist? or this will be till here only?
@ConceptandCoding
@ConceptandCoding Год назад
adding more buddy
@gaurav__singla
@gaurav__singla Год назад
Awesome ❤
@ConceptandCoding
@ConceptandCoding Год назад
Thanks
@abhilashpatel6852
@abhilashpatel6852 Год назад
The notebook URL from the description is not working.
@ConceptandCoding
@ConceptandCoding Год назад
Let me check buddy
@chandlerbing8164
@chandlerbing8164 8 месяцев назад
17:54 client still has to know about all the commads it can perform i do not think this pattern makes any sense or maybe the example is not good
@SHIVAMKUMAR-nb4vo
@SHIVAMKUMAR-nb4vo 11 месяцев назад
Notes Link Not Working
@ConceptandCoding
@ConceptandCoding 11 месяцев назад
Will check and update buddy
@tanmaiysethia176
@tanmaiysethia176 9 месяцев назад
Bhai keerthi ko bolo course mein ye example daaldein
@ConceptandCoding
@ConceptandCoding 9 месяцев назад
?
@tanmaiysethia176
@tanmaiysethia176 9 месяцев назад
@@ConceptandCoding this example was exactly I was looking for. That undo thing made it clear, I had previous problems in understanding why object is required for command
@ConceptandCoding
@ConceptandCoding 9 месяцев назад
@@tanmaiysethia176 glad to know that:)
@tanmaiysethia176
@tanmaiysethia176 9 месяцев назад
@@ConceptandCoding if you can make it clear I can imagine a way if decoupling , even when you directly call the execute function from client side , and pass the receiver in it. Is that correct ?
@chandlerbing8164
@chandlerbing8164 8 месяцев назад
Command Pattern is the stupidest design pattern i have seen so far.
Далее
I Did This With Coffee! 🤯☕️ #shorts
00:22
Просмотров 162 тыс.
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Command Pattern - Design Patterns (ep 7)
39:12
Просмотров 270 тыс.
Abstraction Can Make Your Code Worse
5:13
Просмотров 653 тыс.
8 Design Patterns EVERY Developer Should Know
9:47
Command Pattern - Design Patterns
14:49
Просмотров 99 тыс.
I Did This With Coffee! 🤯☕️ #shorts
00:22
Просмотров 162 тыс.