Mediator Interfaces

Conrad Winchester's Avatar

Conrad Winchester

18 Mar, 2010 09:15 AM

Excuse me if I should just RTFM, but I am considering using RobotLegs with its MVCS implemetation and had what seems to be an obvious question to me.

Is it possible to expect an interface in a mediator for the view class instead of a concrete instance of a particular view?

It seems that this is what DI is all about flexibility, but in the helloFlex demo we have

mediatorMap.mapView(HelloForm, HelloFormMediator);

in the context, and in the HelloFormMediator we hav

[Inject]public var helloForm:HelloForm;

Surely this is an incredibly tight coupling that ought not to be there. Surely it ought to be something like

[Inject]public var helloForm:IHelloForm;

In the mediator so that a concrete view implementation can be injected at runtime - surely that is what DI is all about?

Have I missed something?

Conrad

  1. Stray closed this discussion on 10 Feb, 2011 04:09 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac