Staty: View’s State Switching within MVVM Architecture

Architecture

Example

Staty Example

Advantages

  • It’s reusable as you create one specific state strategy and use it anywhere you need it just by accepting a number of protocols
  • You don’t have to worry about any other state logic and inconsistency when transitioning between states anymore: a state notifies when it exits and other state is being handled sequentaly
  • It’s extendable: when you want to add different error showing logic (for example), just create corresponding strategy and provide it through provider protocol.

--

--

--

iOS-Developer from Russia

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Web Development Team Structure. Key Specialists and Their Roles

How to create a website with Python Flask

IPL(Indian Premier League) Dashboard using Flask, AmCharts, and MongoDB

Hiring Growth Engineers

How to Create a Self-Updating README.md for Your GitHub Profile

Defining Glue Work

Glue work

The Final Bandit: more git, bash variables

The admin side of EvlzCTF 2019

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Isa Aliev

Isa Aliev

iOS-Developer from Russia

More from Medium

Unit Testing in Swift using (MVVM and RX)

Factory Design Pattern in Swift

Guide to Prototype Pattern in Swift

Nivelir: a convenient DSL for navigation