create SBB'S Flow page.

master
Craig Oates 5 years ago
parent
commit
2239778507
  1. 1
      Home.md
  2. 42
      SmoulderingBeachBalls-Flow.md
  3. 1
      Source-Code-Home.md
  4. 1
      _sidebar.md

1
Home.md

@ -41,7 +41,6 @@ Before continuing, I recommend you are familiar with the following;
- [SmoulderingBeachBall Project Breakdown](SmoulderingBeachBall-Project-Breakdown)
- [SmoulderingBeachBall's Main Files Overview](SmoulderingBeachBalls-Main-Files-Overview)
- [SmoulderingBeachBall's Flow](SmoulderingBeachBalls-Flow)
- [SmoulderingBeachBall's Internal Flow](SmoulderingBeachBalls-Internal-Flow)
#### SmoulderingBeachBallCLI

42
SmoulderingBeachBalls-Flow.md

@ -0,0 +1,42 @@
To help you get up to speed on the way Smouldering Beach Ball works, please consider the following image;
IMAGE OF S.B.B. FLOW.
The way it works is you construct a "spec" using the code in "Domain.fs" and pass it to an appropriate function in "Services.fs". From there, "Services.fs" hands it off to "InternalServices.fs". This is after doing some preliminarty checks first. After that, "InternalServices.fs" creates the placeholder image based on the "spec". It is important to note, the output will either be an expection or unit (`()`).
As an aside, I have tried to keep "Domain.fs" and "Services.fs" small. This is because they are the public facing part of the library/NuGet. And, I want to keep S.B.B. easy to integrate into other people's projects. If you do decide to work on this project, please keep this in mind. With that said, I will acknowledge most of the code now resides in "InternalServices.fs" because of it.
## Typical Flow of the System in Code
I though it would would help if I included some code examples with the information above. If all goes well, it should help improve your intution for the project.
```f#
// Note the Async.RunSynchronously.
let synchronousFunction width height =
try
makeSpec width height
|> makeImage
|> Async.RunSynchronously
with
| :? ArgumentException as ex -> ex.Message
| _ as ex -> ex.Message
// Note the Async.Start and one-way of building a spec type.
let asynchronousFunction width height =
try
let oSpec =
{ colour = Brushes.Black
overlayType = Full }
let spec =
{ width = iWidth
height = iHeight
colour = Brushes.AntiqueWhite
filePath = getDesktopPath
overlay = Some }
spec
|> makeImage
|> Async.Start
with
| :? ArgumentException as ex -> ex.Message
| _ as ex -> ex.Message
```

1
Source-Code-Home.md

@ -11,7 +11,6 @@ This section is for those wanting to work with the repository's source code. If
- [SmoulderingBeachBall Project Breakdown](SmoulderingBeachBall-Project-Breakdown)
- [SmoulderingBeachBall's Main Files Overview](SmoulderingBeachBalls-Main-Files-Overview)
- [SmoulderingBeachBall's Flow](SmoulderingBeachBalls-Flow)
- [SmoulderingBeachBall's Internal Flow](SmoulderingBeachBalls-Internal-Flow)
### SmoulderingBeachBallCLI

1
_sidebar.md

@ -16,7 +16,6 @@
- [SmoulderingBeachBall Project Breakdown](SmoulderingBeachBall-Project-Breakdown)
- [SmoulderingBeachBall's Main Files Overview](SmoulderingBeachBalls-Main-Files-Overview)
- [SmoulderingBeachBall's Flow](SmoulderingBeachBalls-Flow)
- [SmoulderingBeachBall's Internal Flow](SmoulderingBeachBalls-Internal-Flow)
#### SmoulderingBeachBallCLI

Loading…
Cancel
Save