I'm currently trying to do a MVVM based WPF program using Prism framework and I'm questioning a lot around commands.
Let me introduce you how things are made for the moment: View with some code behind, ViewModel that contains all the data to display and Model that keeps the data persisted.
The question about Commands came when I had to implement an Element that keeps getting the position of the mouse and process some commands to send to a Hardware. For the moment, it's in the code behind. As it's in the code behind, we can encounter the problem that I can not unit test the commands that are sent to the hardware.
Let's say now I want to put this code behind in the ViewModel, the problem will be performance as the UI will react to the position of the mouse constantly wich results in making a lot of get and set to a value (a lot per seconds).
So then I did my searching and it seems that MVVM is the most controversary topic.
Here's an intance: https://stackoverflow.com/a/30343419/10695437 and https://stackoverflow.com/a/1510592/10695437
So therefore, when do we use binding commands ? Is there a specific type of software that it's important or for some not ?
Edit: Marking it as duplicate with a post that I mentioned above made me just say "Woah". It seems like if the question was answered and was controversial 5 years ago can not be reopen to discuss about it. Thank you, next time i'll just stick with what the majority think and not try to get a "real" answer (wich mean an answer that doesn't begin with "I think" or "IMO") around a question.