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
Limits of Modularity
Search
Samuel E. Giddins
May 19, 2015
Technology
81
0
Share
Limits of Modularity
Samuel E. Giddins
May 19, 2015
More Decks by Samuel E. Giddins
See All by Samuel E. Giddins
Funding Ruby Infrastructure as a Non-Profit
segiddins
0
39
Evolution of Rails within RubyGems.org
segiddins
0
41
The Challenges of Building a Sigstore Client from Scratch
segiddins
0
130
Keeping the Gems Sparkling
segiddins
0
85
A Survey of RubyGems CVEs
segiddins
0
82
Handling 225k requests per second to RubyGems.org
segiddins
0
110
State of the RubyGems 2023
segiddins
0
130
Building Broken Gems
segiddins
0
110
Switching Disciplines as a Tech Lead
segiddins
0
58
Other Decks in Technology
See All in Technology
AWS運用におけるAI Agent活用術 / JAWS-UG 神戸 #11 LT大会
genda
1
300
JTCでRedmine利用者2700人を実現した手法 第二部
nobuonakamura
0
140
CARTA HOLDINGS エンジニア向け 採用ピッチ資料 / CARTA-GUIDE-for-Engineers
carta_engineering
0
47k
マンション備え付けのネットワークとLTE回線を組み合わせた ネットワークの安定化の考案
harutiro
1
140
PdM・Eng・QAで進めるAI駆動開発の現在地/aidd-with-pdm-eng-qa
shota_kusaba
0
260
20260515 ⾃分のアカウントとプライバシーを守る認証と認可の話〜利⽤者向け〜
oidfj
0
770
パーソルキャリア IT/テクノロジー職向け 会社紹介資料|Company Introduction Deck
techtekt
PRO
0
220
社内RAGの導入で気を付けたポイント
yakumo
1
130
Terragrunt x Snowflake + dbt で作るマルチテナントなデータ基盤構築プラットフォーム
gak_t12
0
490
オライリーイベント登壇資料「鉄リサイクル・産廃業界におけるAI技術実応用のカタチ」
takarasawa_
0
420
SpeechTranscriber + AIによる文字起こし機能
kazuki1220
0
110
実践 TanStack Start ― 新規プロダクトを開発して確立した、サーバーとクライアント境界の設計パターン / Practical TanStack Start Server-Client Boundary Patterns
kaminashi
1
120
Featured
See All Featured
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.6k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
560
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
520
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
56
Six Lessons from altMBA
skipperchong
29
4.2k
Tell your own story through comics
letsgokoyo
1
920
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
910
AI: The stuff that nobody shows you
jnunemaker
PRO
7
640
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
700
Transcript
The Limits of Modularity Samuel Giddins
Samuel Giddins Realm CocoaPods Bundler RestKit
Bundler & CocoaPods Two Dependency Managers
None
• ruby -e "$(curl -fsSL https:// raw.githubusercontent.com/Homebrew/install/master/ install)" • brew
install python • easy_install pip • pip install pygments • brew install rbenv ruby-install • rbenv install 2.2.2 • gem install pygments.rb
Let’s take a peek at the architecture behind CocoaPods
None
In an iOS App
Let’s start at the networking layer
We have ’s NSURLConnection / NSURLSession to base things off
of So far, so good
We then use JXHTTP or AFNetworking, since both provide some
features and a nicer API
We then make a TMAPIClient (inside a pod called TMTumblrSDK),
since we want to abstract away the network calls we make
We then make a TumblrCore pod, to be able to
share code between our app and its extensions
And now, we have Tumblr.app! Whew.
That’s what’s called a deep dependency graph.
aside: Those things are really hard to fully ‘resolve’ It’s
a problem I’ve sunk many hours into
So, this is great! We’ve re-used lots of code, made
things modular, ‘componentized’ everything... Life is wonderful!
Until...
We need to change things. (And yes, this is where
we get to the interesting parts)
Let’s say we want to update our UI to show
upload progress for a new post
(I went through nearly this exact scenario when I worked
on the Tumblr app)
OK, so the first step is going to be figuring
out where, exactly, in this stack we can even start.
Start in the wrong place, and you’ll be working at
the wrong level of abstraction, and you’ll be contorting to even make simple changes.
I just need to rearchitect sockets and everything will work
beautifully!
Have fun.
Well, I just need to swizzle these three methods, and
I can do everything in my app!
And again in my share extension. And then again in
the right place because who in their right mind wants to swizzle the same method in three places!?
Again & Again & Again
So we settle upon making this change inside JXHTTP. Excellent.
@property JXHTTPRequestProgressBlock progressBlock;
While we're in there, we choose to move a few
things around to make adding support for that progressBlock easier.
And this is great! !
So now we release a new minor version, and go
back up one level to incorporate those changes.
s/~> 1.2.4/~> 1.3.0
And our tests now fail !
Imagine this happening all the way up the dependency chain
Dependency Paralysis
When our frameworks aren't perfect, the gaps between them can
easily fissure
And our frameworks are never perfect
Edge cases and implicit assumptions propogate through each dependency
One subtle change can be in just the wrong place
And everything collapses
Our usual measures for keeping things sane & safe will
work against us
• Tests • Documentation • Encapsulation • Stable releases
All of those work by applying the brakes on drastic
changes
But N levels deep, every change at the bottom is
drastic
And you'll find that almost every change requires touching something
near the bottom
We also have to decide where to put everything
And choosing wrong? => !
We hear stories of Facebooks and the like with their
mono-repos
And all of this is why Move fast vs. being
"really" modular
So, Samuel, what's the right answer?
Available now on Speaker Deck. https://speakerdeck.com/segiddins/limits-of-modularity
for (Question *question in self.audience.questions) { NSLog(@"%@", [[question ask] valueForKey:@"answer"]);
}
Samuel Giddins Realm @segiddins