views:

425

answers:

1

It looks like the more Mediators in a design, the less quality the design has. Because it means more is done in procedural scripts inside Mediators, and less in OOP.. How do you think?

It reminds mi Transaction Script vs Domain Model contrast from Martin Flower books.

I just catched myself on writing a Mediator object that connects 4 other objects to facade them and create new functionality. But I'm not sure if it is not bad practice: "Ok, got some objects, don't know and don't care if any more are needed, now I will just push them into a Mediator Design Pattern (It's a very nice name) where I will write everything that's missing."

How do you think?

A: 

When you look at the SOLID principles, I think you're saying that you are uncomfortable with Mediators breaking the basic "Single Responsibility Principle". Both the class and the mediator have some responsibilities for an object.

Perhaps if you had a more detailed example, you could identify which specific principles were violated by the design.

S.Lott
Thank you for your answer.