The Memento Pattern Explained and Implemented in Java | Behavioral Design Patterns | Geekific

preview_player
Показать описание

In this video, we break down, define and implement in Java the Memento Behavioral Design Pattern.

Timestamps:
00:00 Introduction
00:07 What is the Memento Pattern?
02:35 Implementing the Memento Pattern
04:13 The Memento Pattern Class Diagram
05:31 Recap
06:05 Thanks for Watching!

If you found this video helpful, check other Geekific uploads:

#Geekific #DesignPatterns #MementoPattern #BehavioralPatterns
Рекомендации по теме
Комментарии
Автор

What I love about these videoa is that they dont focus on the code/implementation, but on getting the idea across of what the pattern is and how its used, which is always the hardest part to grasp

alivemetal
Автор

Thank You. This is a behavioural pattern and it can be used when we want to access to the previous state of an object.
Eg. Database transaction rollback, git stash, step by step process like form filling or booking etc., .

vengateshm
Автор

Good example. One correction might be there in undo method : need to call pop() separately first to remove head of stack and then store the new head of stack (which will be previous state we want to go to) in restore method.

TheGurbaniLawOfLiving
Автор

thanks so much! I Simple and very clear!

isirasamarasinghe
Автор

Why wouldn't the stateHistory be part of TextArea? That way Editor isn't storing data related to TextArea. TextArea would be responsible of storing its states.

yoyoyoufs
Автор

Undo and redo correct

Snapshots huh

#cqrs

antwanwimberly
join shbcf.ru