OK, it’s official. The WPF community loves the Model-View-ViewModel pattern. That’s wonderful! However, I have always had problems with the name. So much so, that I’ve frequently jokingly used the good Dr.’s MVPoo name instead.
So, what’s wrong with the name? As the good Doc explains, there’s a lot of variations on what’s basically the same pattern (forgive me for taking liberties here, as I do know that the variations have very important qualities that distinguish them as unique patterns in and of themselves, but once distilled down for the layman, they’re just different shades of red). Adding a new variation on the pattern can be confusing enough that one should endeavor to ensure there’s no duplication, and let’s be honest, Presentation Model already exists. To be fair, as far as I can tell form searching the Internet on this topic, the first public exposure to Presentation Model was in May of 2004, while the first time Microsoft publicly used the M-V-VM name was in October of 2005. It seems reasonable to me that this variation on M-V-C may have been independently “discovered” at the same time, so it’s more than easy to forgive the existence of two names historically. However, I still find it to be very unfortunate that we have two names for the same pattern.
In an ideal world, I would suggest we stick with a single name, and since Presentation Model was publicly first, we should go with Presentation Model. However, this isn’t an ideal world. The WPF community is too strongly entrenched with the M-V-VM name. The community is just not likely to give the name up, no matter what we do or say now. If it helps (and it helps me), you can think of M-V-VM as a variation of Presentation Model that’s specific to WPF and its data binding and commanding infrastructure. Unfortunately, for outsiders already familiar with Presentation Model, even this explanation is likely to cause confusion, but it’s better than no explanation at all.
OK, so I’m admitting the name isn’t ideal because of the existence of two names for the same pattern, but I’m also relenting to the pressures of the community who have already adopted the name. However, even then, I have some other problems with the name. Model-View-ViewModel is a mouth full. It’s just too much to say and/or type. The acronym M-V-VM is less to type, but it still stinks. It’s a pain to type with the hyphens, and impossible to read without them. When spoken, it’s a tongue twister worthy of inclusion in the Fox in Socks book. I’ve heard from a few insiders that there’s a growing movement to correct this issue by renaming the pattern to just ViewModel (I assume they mean without the space, though I’d prefer View Model which is more in agreement with Presentation Model). This caused me to go over my angst about the name all over again.
If we’re going to change the name, you’ll have to get the community to agree with the change. M-V-VM is so entrenched now, that I’m not sure it’s possible. However, if all of the more influential folks within the community were to adopt the change, it is possible that the community could be swayed. If we were to make that attempt, though, wouldn’t it be better to take the opportunity to reduce the name down to a single name? In other words, wouldn’t it be better to try and sway the community to switch to Presentation Model, which was publicly first and more widely known in the broader community? It seems so to me. However, one could argue that it’s more likely that we’d persuade the WPF community to change the name to View Model than to Presentation Model, because View Model is just a shorter way of saying the already entrenched Model-View-ViewModel name.
So, what do others think? Should we try and change the name within the WPF community? If so, what name should we try and change it to: Presentation Model, View Model, ViewModel, MVPoo?
Edit: Some discussion about this blog entry has also gone on in the WPF Disciples list here.