
Composite Design Pattern
Composite Design Pattern Article : https://medium.com/design-patterns-in-python/composite-design-pattern-7873cb695765
Design Patterns In Python Book : https://www.amazon.com/dp/B08XLJ8Z2J
The Composite design pattern,
- allows you to represent individual entities and groups of entities in the same manner.
- is a structural design pattern that lets you compose objects into a tree.
- is great if you need the option of swapping hierarchal relationships around.
- makes it easier for you to add new kinds of components
- provides flexibility of structure
- conform to the Single Responsibility Principle in the way that it separates the aggregation of objects from the features of the object.
Examples of using the Composite Design Pattern can be seen in a filesystem directory structure, where you can swap the hierarchy of folders, and in a drawing program where you can group, un-group and transform objects, and multiple objects at the same time.
#python
#pythonDesignPatterns
Other Videos By SBCODE
2020-08-27 | Install Loki Data Source and Explore in Grafana 7 |
2020-08-27 | Install Promtail Binary and Start as a Service in Grafana 7 |
2020-08-26 | Install Loki Binary and Start as a Service in Grafana 7 |
2020-08-23 | Zabbix : Reading Windows Event Logs in Zabbix |
2020-08-22 | Graph Non Time Series Data in Grafana 7 |
2020-08-22 | Grafana : Custom MySQL Time Series Queries |
2020-08-21 | Custom MySQL Time Series Queries in Grafana 6 |
2020-08-19 | Install MySQL Dashboard and Collector in Grafana 7 |
2020-08-18 | Grafana : Create MySQL Data Source in Grafana |
2020-08-17 | Proxy Design Pattern |
2020-08-17 | Composite Design Pattern |
2020-08-17 | Facade Design Pattern |
2020-08-17 | Decorator Design Pattern |
2020-08-17 | Adapter Design Pattern |
2020-08-17 | Mediator Design Pattern |
2020-08-17 | Iterator Design Pattern |
2020-08-17 | Observer Pattern |
2020-08-17 | Graph Non Time Series Data in Grafana 6 |
2020-08-17 | Grafana : Bind SSL to your Grafana Nginx Proxy |
2020-08-17 | Grafana : Reverse Proxy Grafana with Nginx |
2020-08-17 | Grafana : Point a Domain Name to your Grafana Server |