-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swift Concurrency v0.2 pushed with more examples
- Loading branch information
Showing
36 changed files
with
680 additions
and
244 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
@@ -1,4 +1,11 @@ | ||
## Coordinator pattern | ||
# Coordinator pattern | ||
|
||
|
||
## Intro | ||
|
||
Navigation Coordinator pattern -> Passing around navigationContext to take care of presenting and dismissing logic from one point. | ||
|
||
|
||
|
||
## Code | ||
|
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 |
---|---|---|
@@ -1,17 +1,18 @@ | ||
## Delegate Pattern | ||
# Delegate Pattern | ||
|
||
|
||
## Intro | ||
1 : 1 type | ||
|
||
|
||
https://medium.com/@nimjea/delegation-pattern-in-swift-4-2-f6aca61f4bf5 | ||
|
||
|
||
Pros: | ||
## Pros | ||
- No extra management of state. It is one to one. | ||
- Less side effects. | ||
|
||
|
||
Cons: | ||
## Cons | ||
- Need to be one to one | ||
- | ||
- Not easy to understand at first glance - isn't intuitive if coming from other languages. | ||
- Lots of bigger name delegate functions - more verbiage. | ||
- need to isolate for cleaner readability in extensions with conformance to `delegate / datasource` |
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 |
---|---|---|
@@ -1,4 +1,27 @@ | ||
## Facade pattern | ||
# Facade pattern | ||
|
||
## Intro | ||
|
||
When you have abstraction in place to make sure that certain thing could be carried out but you don't know the general specifics of its implementation under the hood. | ||
So you place a facade in that callsite and just assume work or certain tasks / preparations have been taking place in the background which isn't oblivious to the front consumer or onlooker. Thus the facade pattern. It derives from actual civil architecture nomenclature. Houses having a great facade. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
### Tangent | ||
|
||
I usually use this to describe human beings, since they are nicer when things are good ( putting up a facade ) but internally they are who they are. | ||
But that's psychology and I don't practice that legally. :P | ||
My two bits `1 0` advice to everyone. |
Oops, something went wrong.