I am having multiple views which are databind to single view model. Now i see a tight coupling with the command name in the different views with the ViewModel. So i need to avaoid this tight coupling. Any help will be highly appreciated.
Cheers, Sajesh Nambiar
This is pretty normal practice when both View and ViewModel references the same command names, this is like a common protocol/public interface. Look at this from an other point of view, Comamnd Name is like a public interface which supported by both sides - View and ViewModel. So
If we look at Commands from Events standpoint - View able to "raise" a given Command in a particular case and exposes this Event (Command) by specifying it Name (like exposing public event) and this is question of ViewModel whether it would handle such a command (subscribe to Event).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With