Software Architecture Patterns: MVC MVP MVVM

Knowing the purpose of using it

INTRODUCTION

MVC, MVP and MVVM are the most popular and industry recognized software architecture patterns. This architectures helps us in achiving modularity, ensure loose coupling in our softwares by separating business logic, user interaction and server responses.

Now we got an overview of software architecture patterns before deep dive into the importance of this patterns let's first explore a basic thought important questions.

What is the purpose of using this architectures?

mmm... a tough question! Let's think of a library. Lots of visitors often visit the library they use the books that are avaiable there and then the person or someone worker appointed keeps the book in it's accurate place. Now, what will happen if some day the worker and all the other visitors place the books in random place? It's is obvious that it would make difficult for library owner to keep track of the books as well as to find a particular book. If the library is small and very limited books were there then it would take a small amount of time but if it is a huge library then it will take significantly a longer amount of time and make the task more tedious. It become more and more challenging as the size of the library increases.

The same is the case with your application. If you are building a software at beginning it won't be hard to manage but as you would add new features to it, implement new logics to it the size would increase significantly making it difficult for you as well as for other developers to work on it.

Using this architectural patterns breaks your project into smaller modules that helps every developer to work independently, provides flexibility, implement best practices of Object-Oriented programming approach. All three patterns offer improved testability and maintainability due to the separation of concerns, making them suitable for projects with a focus on these aspects.