Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Re-Architecting Applications (Without a Rewrite!)
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Daniel Lew
February 10, 2018
Programming
2.9k
8
Share
Re-Architecting Applications (Without a Rewrite!)
Talk given at DevFestMN 2018 & MinneBar 13.
Recording here:
https://youtu.be/dKm7MKoxVIg
Daniel Lew
February 10, 2018
More Decks by Daniel Lew
See All by Daniel Lew
What the fuck are passkeys and why are they everywhere now?
dlew
1
46
How to Use Computers (Privately!)
dlew
0
100
Finding Meaningful, Mission-Driven Work
dlew
0
200
Things Maybe You Don't Know as a Newer Developer
dlew
1
150
Maintaining Software Correctness
dlew
4
1.1k
Grokking Coroutines (MinneBar)
dlew
5
690
ClimateChangeTech.pdf
dlew
0
170
What Tech Can Do About Climate Change
dlew
0
670
Grokking Coroutines
dlew
5
1.4k
Other Decks in Programming
See All in Programming
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
470
自動レビューエンジンの実装と運用 ~レビューのない世界へ~
kurukuru1999
2
300
Talking to terminals (and how they talk back) (KotlinConf 2026)
jakewharton
PRO
1
160
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
110
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
320
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.2k
色即是空、空即是色、データサイエンス
kamoneggi
1
210
Skillは並べた。動かなかった。契約で繋いだ。— 65個のSkillから、自走する開発サイクルへ
junholee
0
790
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
270
Inside Stream API
skrb
1
410
iOS26時代の新規アプリ開発
yuukiw00w
0
220
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1.2k
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
37
7.3k
Paper Plane (Part 1)
katiecoart
PRO
0
8.1k
Building the Perfect Custom Keyboard
takai
2
780
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
74k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
Designing for Performance
lara
611
70k
Building an army of robots
kneath
306
46k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
GraphQLとの向き合い方2022年版
quramy
50
15k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
Transcript
Re-architecting Applications (Without a Rewrite!) @danlew42
architecture: the structure and design of a system or product
None
None
None
None
None
“Model-View- Controller is the best thing since sliced bread.” ~Evil
Dan Lew
“OMG, I’m switching to MVC ASAP!” ~You Stability Some New
Architecture
Danger • Pure architectures require fresh code • Rewrites always
take longer than expected • Old code == battle tested • Expectations may not match reality
Goals • Introduce new architectures to existing codebase • Push
releases while re-architecting codebase
None
</Housing Metaphors>
Goal #1: Introduce new architectures to existing codebase
Re-Architecting Safely • Prevent overly ambitious rewrites • Prevent regrettable
architecture choices • Steps • Explore • Experiment • Expand • Embrace
Explore • What is the problem? • Define goals •
Define constraints • What are the solutions? • Brainstorm • Research
Experiment • Pick a project • Minimize work • Small
project • Simplified implementations • Minimize damage • Self-contained project • Unimportant project
Expand • Run more experiments • Pick projects wisely •
Use architecture in new ways • Pick hardest problems • Stretch architecture to limits
Embrace • Write all new code with new architecture •
Deprecate old architecture • Delete old code (optional)
Disclaimer Not an exact science
Goal #2: Push releases while re-architecting codebase
Can’t simultaneously use old and new architecture Can’t keep releasing
Old New Old + New
Parallel Development
Decouple Code BAD GOOD
Feature Flags
Shims
Shims
Offline Mode A parallel development success story
Online Only Offline Enabled
Decoupling Services Before After
Feature Flags
Shims Before After
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/
Failures With real life examples!
Explore Failures • Architecting with no purpose • Navi •
Choosing new and shiny without understanding • RxJava
Experiment Failures • Making the experiment too large • JavaScript:
The Good Parts • Not recognizing a failed experiment • Operations
Expand Failures • Choosing only easy problems • Identifiers •
Not recognizing a failed corner case • RxLifecycle
Embrace Failures • Continuing to expend effort on old architecture
• Fresh boards
Pet Peeve Telling everyone about an architecture before proving it
out!
Current Architecture Thoughts
Omni Models • Single model • Deserialized from JSON •
Written to ORM • Used by UI • Problems • Which fields are present? • How do we avoid mutability issues?
Domain-specific models • ApiModel • Only used when talking to
server • DbModel • Mutable, flexible • UiModel • Immutable, guarantees values • ApiModel <-> DbModel <-> UiModel
Unidirectional Architecture
Thanks for listening! @danlew42