-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sw_concepts: replace abstract-factory example
Use self drawn stripped down version of the diagram.
- Loading branch information
Showing
5 changed files
with
158 additions
and
16 deletions.
There are no files selected for viewing
Binary file added
BIN
+36.3 KB
topics/sw_concepts/images/abstract-factory/abstract-factory-bad-case.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions
66
topics/sw_concepts/images/abstract-factory/abstract-factory-bad-case.puml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
@startuml | ||
|
||
class Bootstrap | ||
|
||
package views { | ||
|
||
class Header | ||
|
||
class MainView | ||
|
||
} | ||
|
||
package components { | ||
|
||
together { | ||
interface Label | ||
|
||
class LightLabel | ||
|
||
class DarkLabel | ||
} | ||
|
||
together { | ||
interface Button | ||
|
||
class LightButton | ||
|
||
class DarkButton | ||
} | ||
|
||
Label <|.. LightLabel | ||
Label <|.. DarkLabel | ||
|
||
Button <|.. LightButton | ||
Button <|.. DarkButton | ||
} | ||
|
||
package legend <<Rectangle>> { | ||
<> example_diamond | ||
|
||
note left of example_diamond | ||
if darkmode | ||
endnote | ||
} | ||
|
||
<> header_label | ||
|
||
<> main_label | ||
<> main_button | ||
|
||
Bootstrap "creates" ---> Header | ||
Bootstrap "creates" ---> MainView | ||
|
||
Header --> header_label | ||
header_label --> LightLabel | ||
header_label --> DarkLabel | ||
|
||
MainView --> main_label | ||
main_label --> LightLabel | ||
main_label --> DarkLabel | ||
|
||
MainView --> main_button | ||
main_button --> LightButton | ||
main_button --> DarkButton | ||
|
||
@enduml |
Binary file added
BIN
+44.6 KB
topics/sw_concepts/images/abstract-factory/abstract-factory-good-case.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 71 additions & 0 deletions
71
topics/sw_concepts/images/abstract-factory/abstract-factory-good-case.puml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
@startuml | ||
|
||
class Bootstrap | ||
|
||
package views { | ||
|
||
class Header | ||
|
||
class MainView | ||
|
||
} | ||
|
||
package components { | ||
|
||
together { | ||
interface Label | ||
|
||
class LightLabel | ||
|
||
class DarkLabel | ||
} | ||
|
||
together { | ||
interface Button | ||
|
||
class LightButton | ||
|
||
class DarkButton | ||
} | ||
|
||
interface ComponentFactory | ||
|
||
class LightComponentFactory implements ComponentFactory | ||
|
||
class DarkComponentFactory implements ComponentFactory | ||
|
||
|
||
Label <|.. LightLabel | ||
Label <|.. DarkLabel | ||
|
||
Button <|.. LightButton | ||
Button <|.. DarkButton | ||
|
||
DarkComponentFactory --> DarkLabel | ||
DarkComponentFactory --> DarkButton | ||
|
||
LightComponentFactory --> LightLabel | ||
LightComponentFactory --> LightButton | ||
} | ||
|
||
package legend <<Rectangle>> { | ||
<> example_diamond | ||
|
||
note left of example_diamond | ||
if darkmode | ||
endnote | ||
} | ||
|
||
<> create | ||
|
||
Bootstrap "creates" ---> create | ||
create --> LightComponentFactory | ||
create --> DarkComponentFactory | ||
Bootstrap "creates" ---> Header | ||
Bootstrap ---> MainView | ||
|
||
Header --> ComponentFactory | ||
|
||
MainView --> ComponentFactory | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters