-
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
138 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.
57 changes: 57 additions & 0 deletions
57
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,57 @@ | ||
@startuml | ||
|
||
class Bootstrap | ||
|
||
package views { | ||
|
||
class Header | ||
|
||
class MainView | ||
|
||
} | ||
|
||
package components { | ||
|
||
interface Label | ||
|
||
class LightLabel implements Label | ||
|
||
class DarkLabel implements Label | ||
|
||
interface Button | ||
|
||
class LightButton implements Button | ||
|
||
class DarkButton implements Button | ||
|
||
} | ||
|
||
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.
60 changes: 60 additions & 0 deletions
60
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,60 @@ | ||
@startuml | ||
|
||
class Bootstrap | ||
|
||
package views { | ||
|
||
class Header | ||
|
||
class MainView | ||
|
||
} | ||
|
||
package components { | ||
|
||
interface Label | ||
|
||
class LightLabel implements Label | ||
|
||
class DarkLabel implements Label | ||
|
||
interface Button | ||
|
||
class LightButton implements Button | ||
|
||
class DarkButton implements Button | ||
|
||
interface ComponentFactory | ||
|
||
class LightComponentFactory implements ComponentFactory | ||
|
||
class DarkComponentFactory implements ComponentFactory | ||
|
||
LightComponentFactory --> LightLabel | ||
LightComponentFactory --> LightButton | ||
|
||
DarkComponentFactory --> DarkLabel | ||
DarkComponentFactory --> DarkButton | ||
} | ||
|
||
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