In the context of isolated unit testing with mocks, is there an established term for a class that delegates its work to a handful of dependencies? I've used "orchestrator", "delegator", "collaborator" over the years but I don't really like any of them.

11
Share
Share on Mastodon
Share on Twitter
Share on Facebook
Share on Linkedin
Jan Lehnardt :couchdb:

@searls Cocoa/AppKit use Delegate for the class that does the work, so Delegator seems appropriate.

1
1y
Danny Blue

@searls fixture?

1
1y
Bradley Schaefer

@searls you will hate this term even more: Manager

0
1y
jordelver

@searls I don’t know of an official term, but maybe “coordinator”?

0
1y
Nathan H

@searls I think of methods that do that as command methods or control methods so maybe commander or controller? I realize controller has been used mostly in web apps but makes sense to be a general term for a thing that delegates to other things.

0
1y
Tech Chap

@searls
We use "service" for that. Most of our apps are roughly designed as follows.

Message or schedule calls service, service then gets data from API via an API client, hands it to some kind of processor then sends it on storage or another API

0
1y
Jeremy D. Miller

@searls "Conductor" or "Coordinator" (grossly overloaded) in responsibility driven design terms

0
1y
Ted M. Young

@searls I've used "coordinator", and sometimes "orchestrator", but I haven't seen a non-ambiguous established term in use.

0
1y
Sean

@searls a bit cheeky but how about figurehead, since it doesn’t actually do any of the work itself

0
1y
Scott Burwinkel

@searls Not established, but FooDependenciesInATrenchcoat would seem to work.

0
1y
Nathan H

@searls had another thought. never used it before, but what about 'broker'?

0
1y
Replies