iPhone / iPad support • Table cell configuration • Title updates • User interaction processing • Network operations • Reachability calls • Data refresh • Data fetch • Download processing • Tons and tons of video logic • URL processing • Adding / removing player • Caching • Next / previous video • Subtitles • etc.
crashes • Rewriting code / duplicating code is bad • Easy to miss something • Abstracting functionality (and therefore writing more code initially) could be worth it if it improves testing and minimizes future rewrites
hole (unique per hole) • bones inside of hole (array of bone ids) • location within the yard (latitude and longitude) • provides a way to retrieve data objects Controller View Model
bones • tracks most recently buried bone • fetches number of holes • rings when coordinates and current location match • passes formatted data along to view when needed • navigates between list of holes and bones • resizes views
fetches holes and associated bones • tracks most recently buried bone • fetches number of holes • rings when coordinates and current location match • passes formatted data along to view when needed
• bones inside of hole (array of bone ids) • location within the yard (latitude and longitude) • provides a way to retrieve data objects MVVM VM V C M Nav V C
• bones inside of hole (array of bone ids) • location within the yard (latitude and longitude) • provides a way to retrieve data objects BONE FINDER 3.0 M I V C P WF
in any format • As long as they follow a specific protocol • Annabelle can then integrate each module as if it were a view controller • VIPER has the advantage of not needing to peer into other modules to connect code (because of the nice separation of concerns)
architecture with minimal setup overhead • if your app is simple and your testing is fine, you can stick with this • MVVM - model view view model • if your view controllers became massive, good to switch to this • testing is easier than keeping your view controllers massive
if your app is highly collaborative and composed of many parts, good to switch to this • testing is easy too, and the isolation of modules is worth the setup if that was your goal
- iOS Design Patterns by Eli Ganem • Objc - Introduction to MVVM by Ash Furrow • Mutual Mobile - Introduction to VIPER by Jeff Gilbert • Objc - Architecting iOS Apps with VIPER by Jeff Gilbert and Conrad Stoll