SignalCommandMap: Creation point of a Signal Value Object when used in a View Class
Support Staff2 Posted by Ondina D.F. on 16 Aug, 2012 12:49 PM
You can gather View’s data into a new VO and then
transport it around in an application (as a payload of events or
var someVO: SomeVO = new SomeVO (someTextInput.text);
var someVO: SomeVO = new SomeVO ();
Another way is something like this:
var someVO:SomeVO = someListDataProvider.getItemAt(index) as
It’s hard to say what you need (a new VO or just strongly
typed data) in your View without knowing more details.
I’m sure you’ve already read articles on this forum
about VOs and Models. It’s such a big topic.
Have a look at some examples to see how people use VOs in different
ways, depending on their preferences and/or requirements.
Yes I used VO:s for years but usually I create them in my Model,
not in my View. Sometime I inject them (but again not in my
I read that when using SignalCommands it's a good practice to
use value objects as the parameter when talking from view to
mediator. I always used Signals before but as I have not used the
SignalCommand approach before those signals mainly carried string
data or other data rather than VO:s.
However the Views have of course recieved VO:s via mediator from
So what I',m now thinking about doing thus is:
Create VO in my View. Use a past tense signal to notify my
Mediator of the VO, and from there on use a present tense Signal to
pass VO from Mediator to framework.
However, perhaps that the first part, always using VO:s when
communiciating FROM view to mediator (to enfore stronly typed
objects) are not needed.
But I see that Joel Hooks is doing so in his SignalCommand