Closed clstaudt closed 1 year ago
In Python any class can be easily turned into a singleton by adding a generic decorator.
This removes the need for special implementations of the singleton pattern like SingletonDataFrame.
The general idea here is to add new classes, layers and indirections only sparingly:
TimeTrackingView -> TimeTrackingIntent -> TimeTrackingDataFrameSource is better than TimeTrackingView -> TimeTrackingIntent -> TimetrackingDataFrameSource -> SingletonDataFrame.
Complexity considered harmful.
Neat 👍🏾
In Python any class can be easily turned into a singleton by adding a generic decorator.
This removes the need for special implementations of the singleton pattern like SingletonDataFrame.
The general idea here is to add new classes, layers and indirections only sparingly:
TimeTrackingView -> TimeTrackingIntent -> TimeTrackingDataFrameSource
is better than TimeTrackingView -> TimeTrackingIntent -> TimetrackingDataFrameSource -> SingletonDataFrame.
Complexity considered harmful.