Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Re-Architecting Applications (Without a Rewrite!)
Search
Daniel Lew
February 10, 2018
Programming
2.9k
8
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
69
How to Use Computers (Privately!)
dlew
0
120
Finding Meaningful, Mission-Driven Work
dlew
0
220
Things Maybe You Don't Know as a Newer Developer
dlew
1
160
Maintaining Software Correctness
dlew
4
1.1k
Grokking Coroutines (MinneBar)
dlew
5
720
ClimateChangeTech.pdf
dlew
0
180
What Tech Can Do About Climate Change
dlew
0
710
Grokking Coroutines
dlew
5
1.4k
Other Decks in Programming
See All in Programming
AIエージェント時代のコードレビューを設計する
nogu66
6
2.7k
Jetpack Compose メカニズム
skydoves
0
320
巨大モノリシックアプリ モダン化大作戦
ktcryomm
0
970
Webの地図
yosuke_furukawa
PRO
6
4.3k
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
110
業務時間外もAIに働いてもらう話
colorful12
3
10k
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
310
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
700
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
170
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
370
What We Talk About When We Talk About XP
m_seki
2
600
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
100
Featured
See All Featured
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
How to train your dragon (web standard)
notwaldorf
97
6.8k
Marketing to machines
jonoalderson
1
5.8k
The Invisible Side of Design
smashingmag
301
52k
Un-Boring Meetings
codingconduct
0
420
Faster Mobile Websites
deanohume
310
32k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
440
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
270
The Art of Programming - Codeland 2020
erikaheidi
57
14k
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