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
40
How to Use Computers (Privately!)
dlew
0
95
Finding Meaningful, Mission-Driven Work
dlew
0
190
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
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1.1k
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
510
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
360
My daily life on Ruby
a_matsuda
3
400
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
3
850
Back to the roots of date
jinroq
0
860
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
260
Firefoxにコントリビューションして得られた学び
ken7253
2
160
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
490
ハーネスエンジニアリングとは?
kinopeee
13
7k
Programming with a DJ Controller — not vibe coding
m_seki
3
860
[BalkanRuby 2026] Drop your app/services!
palkan
1
140
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.4k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
290
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
780
Mobile First: as difficult as doing things right
swwweet
225
10k
Claude Code のすすめ
schroneko
67
220k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
The Pragmatic Product Professional
lauravandoore
37
7.3k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
380
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
250
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
How to Talk to Developers About Accessibility
jct
2
200
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