3 ms·
What about the case where you would have multiple managers? For example, today you wrote a FooManager that handles all the Foos, next month you'll write a BarMa
by ifyoubuildit 13y ago
What about the case where you would have multiple managers? For example, today you wrote a FooManager that handles all the Foos, next month you'll write a BarManager, and after that a BazManager and so on. Each of these will probably have a slightly different way of handling things...
Creating pipelines for all of these scenarios seems like it would mean you're doing things consistently across your code base, which will hopefully make it easier to maintain. It also might make it easier to reuse code (you can share filters between different services).
- hackinthebochs 13y agoThe problem I see with this is that the pipeline concept also constrains your code in other ways. For example, using the pipeline there is no clean way to allow communication between each successive subprocess. Return values in this case aren't clean (would involve casting), and mutating the data passed around seems like a cure worse than the disease. I know of no way to construct a generic pipeline that allows for all the flexibility of simply successive function calls. I suspect most problems won't cleanly fit the constraints imposed by a generic pipeline.
- mrchuckmills2 13y ago> no clean way to allow communication between each successive subprocess I think this is much of the point behind this pattern, actually.