DIAGRAMMATIC
save your work locally, this app is going away soon!
Login with GitHub
CODE
dejan
/
Strategy Pattern
(public)
%% Strategy Pattern example classDiagram class StorageContext { -storageStrategy: StorageStrategy +StorageContext(storageStrategy: StorageStrategy) +saveFile(fileName: string): void } class StorageStrategy { <<interface>> +save(fileName: string): void } class S3StorageStrategy { +save(fileName: string): void } class LocalStorageStrategy { +save(fileName: string): void } StorageStrategy <|.. S3StorageStrategy StorageStrategy <|.. LocalStorageStrategy StorageContext o-- StorageStrategy : has-a
PREVIEW
PNG
SVG
Auto-save OFF
Saving
You can change the code, but you won't be able to save it as you are not the owner.
mermaid