The Iterator Pattern (Part 1)

preview_player
Показать описание
This video motivates the need for the Iterator pattern in the context of the expression tree processing app case study.
Рекомендации по теме
Комментарии
Автор

0:49 purpose
1:57
2:23 internal iterator - inflexible
2:39 hard to decide when u want to stop traversing
2:58 another way of iterating: *expose the internal links* that are used to represent the tree itself
3:10 undisirable
3:23 really not a good idea to externalize the representation of tree structure
4:17 iterator - 4:21 an object that *encapsulates the traversal* of the tree structure *without requiring the client code that uses the tree to know how the tree is strctured*
4:51 example
6:00 6:07 start out by creating iterator using *factory method*
8:03 commonality and variability point of view

ruixue