What is MVVM?
MVVM stands for Model ,View and ViewModel.It is a architectural pattern for creating decoupled applications.In MVVM pattern application is divided into three layers.
- Model It represents domain entities and business logic
- View It is the User Interface.It represents the Entities to the end user
- ViewModel It connects View with the ViewModel
What are the benefits of MVVM?
The different layers View,ViewModel and Model are loosely coupled.This gives application developed using MVVM pattern following advantages:
- Application is easer to maintain and extend
- Application is easier to unit test
What is a Command?
Commands are used for decoupling the object which invokes the command from the logic which is executed in response to invoking the command.This allows several different UI control actions to raise the same command and thus execute the same logic.For example copy and cut actions can invoke the same command.This results
in better separation of concerns as the logic which handles the action is decoupled from the control which raises the event.
Command objects in WPF are derived from ICommand interface.This interface has two methods Execute and CanExecute.Execute specifies the logic which is executed in response to the action.CanExecute specifies if the action can be invoked,it returns boolean value.
What is a data binding?
Data binding is used to connect data source with data target.Data source provides the data to the data target.Data source can be any CLR object.Data target is usually WPF element such as textbox or combobox.With WPF databinding data is automatically synchronized ,this means that the data changes in the source are
automatically reflected in the data target.Similarly the data changes in the data target are reflected in the data source.
What is PRISM?
PRISM is a set of guidelines for developing easy to maintain and flexible desktop applications.Applications built using PRISM are easier to change.
What are popular MVVM frameworks?
- Prism
- MVVM Light
- Caliburn Micro
What is Delegate Command?
Delegate Command implements ICommand and IActiveAware interface.So instead of implementing the ICommand interface we can use the Delegate Command to simplify the
command creation in our application.
What is dependency property?
Dependency property adds certain features in the normal CLR property system.Class defining dependency property inherits from the DependencyObject class.WPF UI controls are usually inherited from DependencyObject.So UI controls supports dependency properties.
Leave a Reply