The composite design pattern is probably one of the most underrated design patterns but it is actually a great tool to add extensibility to an existing design without adding further complexity.
Source code used in this tutorial:
github.com/plainionist/AboutC...
0:00 Intro
0:34 The obvious idea
1:36 ServiceLocator?
2:12 Composite pattern
2:45 Ready for implementation?
3:20 Introducing ChangesetId and CommitId
4:46 Adding the Git implementation
5:03 Implementing the composite object
5:45 Introducing the option type
7:06 Conclusion
30 июн 2024