0

Remove middle man has diagrams from hide delegate?

Petr Vnenk 9 月 前 更新人: Hoang Tran 8 月 前 1

I feel like https://refactoring.guru/remove-middle-man resues diagrams from https://refactoring.guru/hide-delegate, just switches their position (suddenly the solution is a problem). Shouldn't "remove middle man" have completely different diagrams?

In these cases, we need to weight which solution we should go for. The first one is the middle man has too many methods that simply delegate to other objects while the second one wants to hide the delegate. Both problems are quite vague in my opinions. We should try both to see if it solves our current code design.

UserEcho 的客户支持