What is the best enterprise mobile app architecture?
There are many strategies to use to structure code when crafting a mobile application. The number of methodologies has increased through the years as developers look to find a better solution to structure their applications and make code more readable and reusable.
Let’s look at the main app architectures out there:
Model View Presenter is a pattern that’s view is loosely coupled with the model. Complex views may have multiple presenters.
In practice, it can be quite a bit of extra work and extra layers to achieve the same result.
Model-View-ViewModel is an approach that adds another layer to the view that handles the presenter logic. MVVM is similar to MVP, but the ViewModel is more tightly coupled to the view itself. If you have a complicated view, this can actually save your team time while making the code more readable.
What do you need to know about VIPER? There’s a view that interacts with a presenter that’s communicating to a router while sending messages to the interactor. That interactor is communicating with the data.
It is to us. We avoid working with this architecture at all costs.
I’m sure overly complex applications can get value out of this approach, but we strive to avoid building overly complex applications altogether.
Model-View-Controller is the most simple of the bunch. The controller is responsible for passing messages between the view and the model. The model never talks directly to the view and vice-versa.
Enterprise applications usually do not have the most logic. They are specific tools to get a job done.
MVC is the most well-known framework and will be easy for developers to pick up quickly.
When working on an enterprise application, stick with the old adage, “Keep It Simple, Stupid!”
Your organization is likely complex enough. There’s no need to make things more complicated than they need to be.