Don't Pull & Push at Once!
←Older revision | Revision as of 07:42, 19 June 2017 | ||
Line 38: | Line 38: | ||
== Don't Pull & Push at Once! == | == Don't Pull & Push at Once! == | ||
- | The thing to remember is that (unless there are [[ImpossibleThreading|threading concerns]]), it is always possible to simulate the '''push''' approach with the '''pull''' one. E.g. it makes no sense to design an [[API]] that supports both - prefer the '''pull''' approach as the more flexible one. | + | The thing to remember is that (unless there are [[ImpossibleThreading|threading concerns]]), it is always possible to simulate the '''push''' approach with the '''pull''' one. E.g. it makes no sense to design an [[API]] that supports both - prefer the '''pull''' approach as the more flexible one. Your [[API]] users can always turn push into pull themselves: |
<source lang="java"> | <source lang="java"> |