Тёмный

Memento Design Pattern (C#) 

Raw Coding
Подписаться 73 тыс.
Просмотров 6 тыс.
50% 1

The memento design pattern explained with examples in code.
Patreon 🤝 / raw_coding
Courses 📚 learning.raw-c...
Shop 🛒 shop.raw-codin...
Discord 💬 / discord
Twitter 📣 / anton_t0shik
Twitch 🎥 / raw_coding
Playlist: • c# design patterns
Source: github.com/raw...
#csharp #memento #designpatterns

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

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@davidwhite2011
@davidwhite2011 3 года назад
Love it. Would like a description of what it is before I watch. The memento pattern is a software design pattern that provides the ability to restore an object to its previous state (undo via rollback). The memento pattern is implemented with three objects: the originator, a caretaker and a memento.
@RawCoding
@RawCoding 3 года назад
Thanks for watching and the feedback
@georgeblazhev
@georgeblazhev Год назад
That's really helpful, thank you. I'll use it at my job. I need to implement a rollback but I'm unable to do a Saga, because the two services I'm calling in order to update an object don't have event listeners and one of them will be deprecated soon, so implementation of handlers is not an option. I need to be able to rollback the previous state in order to send a second update request. I use Redis to store the previous state, but this is a more elegant way. Thank you!
@husseinshukre3828
@husseinshukre3828 3 года назад
best channel you could find
@RawCoding
@RawCoding 3 года назад
Cheers
@tharindusenevirathna3070
@tharindusenevirathna3070 3 года назад
marvellous explanations bro... really appreciate and very helpful. Would you please start Apache Kafka tutorials also... 🙂
@RawCoding
@RawCoding 3 года назад
Cheers, I’ve never used Kafka
@HamzaAlfar-p3c
@HamzaAlfar-p3c 11 месяцев назад
🎉
@stefanioan7569
@stefanioan7569 3 года назад
Hi buddy, keep up the hard work! 👍
@RawCoding
@RawCoding 3 года назад
Cheers
@erictech8487
@erictech8487 2 года назад
I don't see why using Editor and Snapshot (EditorState) classes are helpful. If we want to add or undo changes, then why not have a History class to store the state history in a Stack or a List? Why bring up other classes like Editor class or Snapshot class? public class History { private Stack states = new Stack(); public void push(T item) { states.push(); } public T pop() { return states.pop(); } }
@kostasgkoutis8534
@kostasgkoutis8534 3 года назад
Man amazing!! I didn't know that if you accept another object A of the same class as you (A), you can reference it's private field!! I guess you would know it's address in memory?? How does this work, I'm perplexed!
@RawCoding
@RawCoding 3 года назад
That’s just legal c#, not sure how exactly it works
@swatarcommon
@swatarcommon Год назад
Java guys says this is because access restrictions apply at the class or type level (all instances of a class) rather than at the object level (this particular instance of a class).
@kostasgkoutis8534
@kostasgkoutis8534 Год назад
I mean, it kind of makes sense. Otherwise, you wouldn't be able to make copy methods. I think only Ruby is more strict for private members, but I have to check it again.
@clearlyunwell
@clearlyunwell 3 года назад
👍🏽
@RawCoding
@RawCoding 3 года назад
)
Далее
Strategy Design Pattern (C#)
7:33
Просмотров 10 тыс.
Dependency Injection, The Best Pattern
13:16
Просмотров 849 тыс.
РЫБКА С ПИВОМ
00:39
Просмотров 387 тыс.
НИКИТА ПОДСТАВИЛ ДЖОНИ 😡
01:00
Просмотров 132 тыс.
Prototype Pattern in C#: A Step-by-Step Guide
20:00
Просмотров 1,2 тыс.
Observer Pattern - Design Patterns (ep 2)
49:47
Просмотров 567 тыс.
[Design Pattern] State Pattern in c#
6:50
Просмотров 2,7 тыс.
The Smart Way of Using the Decorator Pattern in C#
12:37
РЫБКА С ПИВОМ
00:39
Просмотров 387 тыс.