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
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
47
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
680
Grokking Coroutines
dlew
5
1.4k
Other Decks in Programming
See All in Programming
Oxcを導入して開発体験が向上した話
yug1224
4
280
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
440
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
600
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
200
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
460
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.4k
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
260
inferと仲良くなる10分間
ryokatsuse
1
360
Moments When Things Go Wrong
aurimas
3
140
GitHub Copilot CLIのいいところ
htkym
2
1.3k
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
270
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.2k
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
240
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
280
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
WCS-LA-2024
lcolladotor
0
620
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
420
Scaling GitHub
holman
464
140k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
530
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
140
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Mind Mapping
helmedeiros
PRO
1
230
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