Hacker News new | ask | show | jobs
by codereflection 2728 days ago
Perhaps because David J. Wheeler said "We can solve any problem by introducing an extra level of indirection."
1 comments

Except too many levels of indirection...
Just wrap it in an IndirectionManager and instantiate that via an IndirectionManagerFactory and you're good to go. :)
You forget the IndirectionPolicy interface...
Funny you mention that. I was considering amending my post to include IndirectionStrategy.

But I was worried about opening a Pandora's box of indirection design patterns.

I mean, who are we to assume that you want to invoke all this indirection now? Better to wrap it all in an IndirectionCommand so you can invoke it whenever you want.

And there's no need to keep too many copies of identical IndirectionCommand instances around, so you'll also want an IndirectionCommandCache class, which will of course need an IndirectionCommandCacheStrategy because you don't want to just assume you know how and for how long people will want to cache those commands.

I guess that threshold is different for everybody, who's to say what works best in a certain situation?