Is chaining a bad design?

Is this "good" for the delegate chaining?

Object A delegates to Object B, which in turn delegates the same method to Object C ...

I have a view that needs data from a model connected to it. The controller of the parent view of the controller controller. Basically there are 2 VC between view and model.

Or is there a better way to do this.

+7
source share
1 answer

There are no "good" or "bad" templates.

You should use your common sense to know if your β€œchain” delegation makes sense or not.

  • Will future changes facilitate?

  • Is the code more independent modular in this way?

  • Is this chain delegation just bloating code useless?

... no "good" or "bad." Some models are better suited in some situations, some in others ... and usually the most direct way is the best.

+8
source

All Articles