Memento Design Pattern in GTA Vice City (Arabic)
Вставка
- Опубліковано 1 чер 2024
- شرح انماط البرمجة بطريقة سهلة
Reference:
Java Design Patterns by Vaskaran Sarcar
0:00 Introduction
0:14 Problem we're trying to solve
2:07 Real Life Scenario
3:45 Class Diagram
4:27 When to use?
4:49 Code Example
7:45 Programming Scenario
8:34 Pitfalls
Src Code:
gist.github.com/Mostafico/248...
#برمجة
Data Structures in Arabic playlist
• هياكل البيانات من زمن ...
Design Patterns playlist:
• Behavioral Design Patt...
Programming in C:
• 1-Introduction to prog...
Linkedin:
/ mostafa-ragab-70a3671a8 - Наука та технологія
شرح بسيط و رائع يا باشمهندس
فى انتظار المزيد من الدروس و جزاك الله خيرا
شكرا لحضرتك ده من فضل ربنا عليا
بارك الله فيك يا باشمهندس
وفيكم يارب شكرا جدا لحضرتك
مجهود ممتاز
وعرض شيق غير ممل
تسلم ايدك
شكرا جزيلا لحضرتك
شرح استثنائي 🎖️❤️💯
شكرا جزيلا لحضرتك هذا من فضل الله
❤️
طيب إيه الفرق بين Memento design pattern و Command design pattern؟
first of all, both can be used together, you use the command pattern to encapsulate some functionality of an object in a class and u use an invoker to trigger this functionality, so as we said if you have a tv class instead of putting turnOnTV function inside tv class, you will create a turnOnTV command and an invoker to invoke these commands, on the other hand you will use memento design pattern to save the state of the tv so you can undo it, as an example if the invoker invoked turnOnTV command, the state of the tv will be ON , then using the memento you can undo the command and turn it off as the last state before turning it on was off, I hope this makes things clear, if it's not clear yet tell me and I'll try to explain with another example, also sorry for replying in English as I cannot write both Arabic and English in one Comment
@@devgeeksacademy3340
Replying in English is perfectly fine with me. Thanks for your explanation 😊
What you said about the coupling of the Command and the Memento patterns, I used to think it is all related to the command pattern alone! I'm glad you clarified this for me.
@@AserAhmad You're welcome anytime.