Answer :

Answer:

MVVM stands for Model, View,ViewModel. ViewModel act as an interface between view and Model.it internally follows command pattern

Explanation:

Command Pattern contains Invoker(Sender),Command, Receiver. Invoker invokes a command with some data .Command object invokes the corresponding Receiver based on  command and data .Receiver receives the command and data, executes the actual logic for the command.

MVVM follows Command Pattern. View is the invoker which invokes some command (Execute) with parameters. View Model  directs that command with parameters to the corresponding receiver class which actually implements that execute method with the given data/Parameters.

To explain the above concept in simple Example, when we go to hotel we invoke the order using waiter and waiter redirects that to the cook. Cook will prepare your food. Here Customer is the Invoker who invokes the command and waiter is the director who redirects that command to the Receiver. Cook is the Receiver who actually implement that command

Other Questions