The MVVM design pattern has been around for quite a while now. It has a lot of strengths when done correctly. But, I believe the time has come to recognize that MVVM has a lot of shortcomings that point to its demise. Since I primarily develop web applications, I will keep this discussion centered on the use of MVVM in web applications. The use of MVVM for desktop may or may not have these same issues.
I realize that for some of you, the very suggestion of dropping MVVM will invoke a negative emotional response. Some very smart people have quit their job at the suggestion that MVVM and its close cousin two-way data-binding, be abandoned in favor of another way. But just for a few minutes, I would like for you to stop treating programming as a religion and consider the possibility that there may be a better way.
I’ve had two incidents recently that have shown me how TDD impacts Software Architecture. Both of these are with code I’m working on.
What Software Architecture Might Do
Software architecture might specify how is put together at a very high level. For example, software architecture might specify that we use a three tiered approach or an n-tiered approach. This approach places our view code is at one level, our business rules are at another level, and our data access at yet a third level.