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

Re-Architecting Applications (Without a Rewrite!)

Daniel Lew
February 10, 2018

Re-Architecting Applications (Without a Rewrite!)

Talk given at DevFestMN 2018 & MinneBar 13.

Recording here: https://youtu.be/dKm7MKoxVIg

Daniel Lew

February 10, 2018
Tweet

More Decks by Daniel Lew

Other Decks in Programming

Transcript

  1. Danger • Pure architectures require fresh code • Rewrites always

    take longer than expected • Old code == battle tested • Expectations may not match reality
  2. Re-Architecting Safely • Prevent overly ambitious rewrites • Prevent regrettable

    architecture choices • Steps • Explore • Experiment • Expand • Embrace
  3. Explore • What is the problem? • Define goals •

    Define constraints • What are the solutions? • Brainstorm • Research
  4. Experiment • Pick a project • Minimize work • Small

    project • Simplified implementations • Minimize damage • Self-contained project • Unimportant project
  5. Expand • Run more experiments • Pick projects wisely •

    Use architecture in new ways • Pick hardest problems • Stretch architecture to limits
  6. Embrace • Write all new code with new architecture •

    Deprecate old architecture • Delete old code (optional)
  7. Offline Mode • Project length: 1.5 years • Never stopped

    releasing • Minimal UI changes • Gradual experimentation via flags • Switched over without anyone noticing • https://tech.trello.com/sync-architecture/
  8. Explore Failures • Architecting with no purpose • Navi •

    Choosing new and shiny without understanding • RxJava
  9. Experiment Failures • Making the experiment too large • JavaScript:

    The Good Parts • Not recognizing a failed experiment • Operations
  10. Expand Failures • Choosing only easy problems • Identifiers •

    Not recognizing a failed corner case • RxLifecycle
  11. Omni Models • Single model • Deserialized from JSON •

    Written to ORM • Used by UI • Problems • Which fields are present? • How do we avoid mutability issues?
  12. Domain-specific models • ApiModel • Only used when talking to

    server • DbModel • Mutable, flexible • UiModel • Immutable, guarantees values • ApiModel <-> DbModel <-> UiModel