Extending MVVM Pattern to MVVMP Pattern

As per my knowledge the sole purpose of ViewModel in MVVM pattern is data binding.

MVVM is really a great pattern to decouple the graphical representation (xaml) from the behaviour (code)

However, when I design software, I follow (amongst others) the principles of SOLID.

The first principle in SOLID is the Single Responsibility Principle (SRP) that states that “A class should have one, and only one, reason to change.”

I think we are avoiding the rules of SOLID in MVVM pattern. The question might be HOW??
In viewmodel we are writing logic for data binding as well as business logic. So we are avoiding SRP principle SOLID.

So I have decided to write an article about a new pattern which I have implemented in one of my project and the pattern is MVVMP.

MVVMP stand for Model-View-View Model-Presenter.

In MVVMP I have simply removed the view layer business logic from View Model and added it into Presenter layer.

I have attached a sample project. Hope this sample might be well understandable. Please feel free to ask any question on my email id sanjiv.panigrahi@yahoo.com. 


Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now