Disable Proxy injection into Mediators by default. (You will have to explicitly enable it) #54

MindScriptAct opened this Issue Nov 29, 2013 · 0 comments


None yet

1 participant


Injecting proxies into mediators is bad practice. (Application state is exposed for change from View, without triggering Controller)
.. but sometimes you still want to do it. (to same time is some specific applications)

I want to disable Proxy injection into mediators by default. - if you try to do it - you will get error.

You still can enable proxy injection into mediator - but you will have to explicitly set it:

proxyMap.map(new MyProxy(), null, null, MyProxy);

This will enable you to inject MyProxy into mediators.

proxyMap.map(new MyProxy(), null, null, IMyProxy);

This is even better practice, it will enabel you to inject MyProxy as IMyProxy into mediators. (that contains get data only functions)

proxyMap.map(new MyProxy());

With this you will not be able to inject, or get MyProxy in mediators. If you try - you will get Error.

@MindScriptAct MindScriptAct added a commit that referenced this issue Dec 26, 2013
@MindScriptAct #54 Proxies will be protected from injection into mediators, unless y…
…ou implicitly allow the proxy to be injected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment