BlogsShopifyAndroid POS Architecture (MVVM)

Android POS Architecture (MVVM)

Android POS Architecture (MVVM)

1
posts
2018

This feature thread tracks the development and enhancement of Shopify's Android Point of Sale (POS) application architecture. Initial efforts focused on addressing architectural inconsistencies by migrating from competing MVC and MVP patterns to a unified Model-View-ViewModel (MVVM) approach. This adoption leverages Google's Android Architecture Components, including ViewModel and LiveData, to ensure consistent architecture, automatic state retention across configuration changes, and a clearer separation of concerns for improved testability and developer onboarding. The strategy involves adopting MVVM for all new screens and converting older screens incrementally.

2018

Building Shopify POS for Android Using MVVM - Shopify

10/31/2018

This post details the adoption of the Model-View-ViewModel (MVVM) architectural pattern for the Shopify POS Android app, migrating from legacy MVC and MVP architectures. It explains the roles of View, ViewModel, ViewModelProvider, Model, and LiveData within the MVVM pattern and illustrates the data flow with a simple example. The benefits of MVVM, including consistent architecture, state retention, separation of concerns, and improved testability, are highlighted.