Overview of Westore Architecture
masterWestore implements an MVVM-like architecture (similar to MVP) designed for WeChat Mini Programs to improve maintainability and testability:
- Model: Thick layer containing all business/game logic. Models are platform-independent and can be reused in Web, Canvas, or Games without modification.
- Store: A thin mediator layer that manages the data required by the View and bridges the gap between the View and the Model. It holds the
dataobject used by the View. - View (Passive View): A very thin layer (Page or Component) that contains no business logic. It only displays data and forwards user inputs (clicks, swipes, etc.) to the Store.