Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Meetup Onboarding: iOS App Architecture & Release Process

Meetup Onboarding: iOS App Architecture & Release Process

An intro to the Meetup iOS app's architecture and release process.

lauraragone

January 25, 2018
Tweet

More Decks by lauraragone

Other Decks in Technology

Transcript

  1. Today, we’ll cover… A brief history of the iOS app

    1 2 Development and release cycle basics 3 App architecture overview Mobile Onboarding Laura Ragone & Michael Pace
  2. • Born from a hackathon in 2010 • Created by

    Ivy Feraco & Rich Hsieh The Legacy App Mobile Onboarding Laura Ragone & Michael Pace
  3. The Legacy App Mobile Onboarding Laura Ragone & Michael Pace

    • Language: Objective-C • Local database: Core Data • Networking: AFNetworking • Package Manager: Cocoapods
  4. The Redesigned App Mobile Onboarding Laura Ragone & Michael Pace

    • Language: Swift • Local database: Realm • Networking: Alamofire • Package Manager: CocoaPods
  5. • Sprints or Kanban • Tickets following branch naming convention

    automatically transition Mobile Onboarding Laura Ragone & Michael Pace Development: Workflow
  6. • Git Flow (develop and master branches) • Pull requests

    follow the PR template: • Screenshots / Gifs • What it Does • How to Test • Notes • Assigned, reviewed, and merged in a timely manner • Branches are deleted post-merge Development: Pull Requests Mobile Onboarding Laura Ragone & Michael Pace
  7. • Release Train • Updates launch approximately every two weeks

    Mobile Onboarding Laura Ragone & Michael Pace Development -> Release
  8. Notable Release Cycle Events Feature Freeze 1 2 Code Freeze

    3 App Store Submission Mobile Onboarding Laura Ragone & Michael Pace
  9. • Model - View - Controller (MVC) • …with View

    Models Architecture: Design Paradigm Mobile Onboarding Laura Ragone & Michael Pace
  10. • Abide by the Single Responsibility Principle & a Separation

    of Concerns • Prefer protocols to classes for abstraction • Prefer value types to reference types when identity is irrelevant • Restrict access control and prefer immutability to mutability when possible • Prefer Interface Builder-based approaches to programmatically created UI Architecture: Our Key Values (other than dictionaries) Mobile Onboarding Laura Ragone & Michael Pace
  11. • Must combat the problem of massive view controllers •

    Control behaviors, leaving the details of view presentation to view models • Use view controller containment when applicable to prevent single view controllers from growing too large Architecture: View Controllers Mobile Onboarding Laura Ragone & Michael Pace
  12. • Responsible for: • Initiating network requests • Upon load/appear

    • Pull to refresh • Pagination • Handling delegate callbacks & performing actions • Presenting or dismissing other controllers Architecture: View Controllers Mobile Onboarding Laura Ragone & Michael Pace
  13. • Responsible for: • Supporting loading, empty, and populated states

    • Either handed new data or allowed to grab persisted information Architecture: Data Sources Mobile Onboarding Laura Ragone & Michael Pace
  14. • Wrapper around Realm • Responsible for: • Adding objects

    to a local database • Deleting stale objects Architecture: Persistence Controller Mobile Onboarding Laura Ragone & Michael Pace
  15. • Responsible for: • Dequeuing cells • Performing required cell

    configuration • (i.e.: transforming model data, setting the view model) • Initiating delegate callbacks from cell actions Architecture: Cell Creators Mobile Onboarding Laura Ragone & Michael Pace
  16. • Decouple cell creators from data sources • Currently implemented

    for Group Communication Architecture: Potential Improvements Mobile Onboarding Laura Ragone & Michael Pace
  17. • Responsible for: • Mirroring objects as returned from a

    web service • Backing information • Computed properties are tested • Currently fragmented to circumvent persistence issues (i.e: stomping) Architecture: Models Mobile Onboarding Laura Ragone & Michael Pace
  18. • Object stomping can be avoided via partial updates •

    Replace fragmented model objects with single, unified model Architecture: Model Fragmentation Mobile Onboarding Laura Ragone & Michael Pace
  19. • Responsible for: • Displaying User Interfaces • Limited to

    appearance • Does not transform information from a model • Nested View Models Architecture: Views Mobile Onboarding Laura Ragone & Michael Pace
  20. • Responsible for: • Encapsulating the data needed to populate

    a particular kind of view • Simple structs • Supported by translator objects • Translators are tested Architecture: View Models Mobile Onboarding Laura Ragone & Michael Pace
  21. • Responsible for: • Handling networking and persistence • Creating

    requests • Notifying callers about successes and failures via closures • Get tested Architecture: Updaters Mobile Onboarding Laura Ragone & Michael Pace
  22. • Responsible for: • Defining information required to construct a

    network request: • Endpoint • Parameters • Optional headers • Get tested Architecture: Requests Mobile Onboarding Laura Ragone & Michael Pace
  23. • Wraps Alamofire • Turns requests into chainable requests, abstracted

    away from Alamofire’s default chainable request implementation • Manages the underlying networking mechanism Architecture: Network Controller Mobile Onboarding Laura Ragone & Michael Pace
  24. • Responsible for: • Deserializing JSON to Swift model objects

    • Failing gracefully when met with malformed data • Get tested Architecture: Parsers Mobile Onboarding Laura Ragone & Michael Pace
  25. • Responsible for: • Creating creating dynamic table view forms

    • Each cell holds a distinct responsibility Notable Systems: XLForm Mobile Onboarding Laura Ragone & Michael Pace
  26. • Responsible for: • Routing URLs to the appropriate native

    views • Deep Links: meetup://* • Universal Links: http://www.meetup.com/* Notable Systems: Deep Link Handlers Mobile Onboarding Laura Ragone & Michael Pace
  27. • Constants for defining the appearance of fonts and colors

    used throughout the app • Configured programmatically Notable Systems: Design Mobile Onboarding Laura Ragone & Michael Pace