Reynald talks about how The Iterator Pattern is applied to the code in this video. This is the first of two videos that reviews code demonstrating the pattern w/ a real world example of traversing through a collection of reporters from two companies. Specifically, for this video, you'll get a clear understanding of what and Aggregate and Concrete Aggregate is.
- [Voiceover] In our class diagram for the…iterator pattern, we had four key classes.…At the top, we had the aggregate and the iterator,…and those were their abstractions.…And then below them were their concrete implementation,…the concrete aggregate and the concrete iterator.…In Visual Studio here, let's open up our…exercise folder, and navigate to…the solution for the iterator pattern.…In the solution explorer, you'll notice…on the right hand side, we have a folder…for aggregate and a folder for iterator.…
Let's start off with the aggregate,…and open up INewspaper.…Our aggregate is very straightforward.…It's an interface called INewspaper,…and its definition is CreateIterator…of type IIterator.…Moving on next, we can look at the concrete implementation.…Let's first look at LAPaper.…LAPaper implements INewspaper, and it has a collection.…The collection is an array of reporters,…and what we see here is I have a private variable…called _reporters, and within the constructor is the array.…
And right below it, we have our method CreateIterator…
In this course, developer and technologist Reynald Adolphe explains the purpose and effective use of eight design patterns, including six Gang of Four design patterns and two .NET patterns. Gang of Four patterns fall under three categories: structural, creational, and behavioral. Reynald helps you learn about select patterns from each category. He describes each pattern and demonstrates how programmers can leverage them in real-world applications.
- Factory Method
- Abstract Factory
- Singleton pattern
- Decorator pattern
- Iterator pattern
- Observer pattern
- Repository pattern
- Unit of Work pattern
Skill Level Intermediate
2. Factory Method
3. Abstract Factory
4. Singleton Pattern
5. Decorator Pattern
6. Iterator Pattern
7. Observer Pattern
8. Repository Pattern
9. Unit of Work Pattern
Convert to Unit of Work3m 53s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.