I've always wanted this, and I have often thought about writing it. But I needn't.
This is great.
Drawing flow diagrams, or class diagrams in ascii.
http://www.asciiflow.com/#Draw
+------------+
| Comparison |
+------------+ e.g. Apple e.g. Pear e.g. Grape
+---------+ +---------+ +---------+
| Thing | | Thing | | Thing |
| | | | | |
+---------+ +---------+ +---------+
+---------------+ +----------+ +----------+ +----------+
|ComparisonPoint| |Calculated| |Calculated| |Calculated|
+---------------+ | Value | | Value | | Value |
+----------+ +----------+ +----------+
+---------------+ +----------+ +----------+ +----------+
|ComparisonPoint| |Calculated| |Calculated| |Calculated|
+---------------+ | Value | | Value | | Value |
+----------+ +----------+ +----------+
+---------------+ +----------+ +----------+ +----------+
|ComparisonPoint| |Calculated| |Calculated| |Calculated|
+---------------+ | Value | | Value | | Value |
+----------+ +----------+ +----------+
+----------+ +----------+ +----------+
|Comparison| |Comparison| |Comparison|
| result | | result | | result |
+----------+ +----------+ +----------+
Strategy Pattern
-----------------
+-----------------------+ +----------------+
| Context | | IStrategy |
|-----------------------| |----------------|
| +--------> |
| ctor(IStrategy) | | |
| | | PerformWork() |
+-----------------------+ +---^------------+
|
| +
+---------------------+----+
| |
| |
+-----------+--+-----+ +-------------+------+
| ConcreteStrategyA | | ConcreteStrategyB |
|--------------------| |--------------------|
| | | |
| PerformWork() | | PerformWork() |
+--------------------+ +--------------------+
No comments:
Post a Comment