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
Reclaim your architecture @ sbonrails
Search
shagemann
February 12, 2014
Technology
1
110
Reclaim your architecture @ sbonrails
The slides of my February 12, 2014 talk at Santa Barbara on Rails
shagemann
February 12, 2014
Tweet
Share
More Decks by shagemann
See All by shagemann
Gradually Modularizing your Monolith with Ruby Packs and Packwerk
shagemann
0
1.1k
Structural Engineering in Ruby
shagemann
0
1.2k
Productize Your Services! @ springone 2017
shagemann
0
1.2k
Software Components @ RUG-B
shagemann
0
1.2k
Boulder Ruby Group Beginner's Track - What to Do Next?
shagemann
0
84
GET STARTED WITH COMPONENT-BASED RAILS APPLICATIONS! @ Rocky Mountain Ruby 2015
shagemann
1
130
Get started with Component-Based Rails @ RailsConf 2015
shagemann
3
1.5k
Refactoring towards Component-based Rails Architectures @ RailsConf 2014
shagemann
5
1.6k
The Rich, Flowers, and Piles of Sh%#t - And What To Do About It
shagemann
0
69
Other Decks in Technology
See All in Technology
銀行でDevOpsを進める理由と実践例 / 20250317 Masaki Iwama
shift_evolve
1
130
Go製のマイグレーションツールの git-schemalex の紹介と運用方法
shinnosuke_kishida
1
570
OCI見積もり入門セミナー
oracle4engineer
PRO
0
130
OPENLOGI Company Profile
hr01
0
62k
製造業の会計システムをDDDで開発した話
caddi_eng
3
1k
モンテカルロ木探索のパフォーマンスを予測する Kaggleコンペ解説 〜生成AIによる未知のゲーム生成〜
rist
4
1.2k
SpannerとAurora DSQLの同時実行制御の違いに想いを馳せる
masakikato5
0
580
初めてのPostgreSQLメジャーバージョンアップ
kkato1
0
480
Road to SRE NEXT@仙台 IVRyの組織の形とSLO運用の現状
abnoumaru
1
430
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
20k
開発現場とセキュリティ担当をつなぐ脅威モデリング
cloudace
0
120
アプリケーション固有の「ロジックの脆弱性」を防ぐ開発者のためのセキュリティ観点
flatt_security
36
14k
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
172
14k
Bash Introduction
62gerente
611
210k
The Cult of Friendly URLs
andyhume
78
6.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
30k
Documentation Writing (for coders)
carmenintech
69
4.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.8k
Optimising Largest Contentful Paint
csswizardry
35
3.2k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
25k
Transcript
Reclaim your architecture Stephan Hagemann
Rails developers?
STEPHAN GERMAN GERMANY BOULDER ROCK CLIMBING WHITE MALE NETHERLANDS CYCLING
DIVING CONSULTANT RUBY RAILS GO XING PIVOTAL LABS
None
None
Labeling in Software development
No Rails app starts with a namespace
All gems start with a namespace
Rails Gems
AEH FACE Rails Gems
! ! ! ! ! ! ! ! ! +
active record + active support + action controller Rails Gems
How can you tell what still belongs?
None
Try this! ! Namespace everything in your next app
Give yourself a box so you can start thinking outside
of it
Can you prove small chunks?
Growing size
Exploding complexity SIZE POSSIBLE INTERACTIONS
Effect of structure VS
SIZE POSSIBLE INTERACTIONS Reduced exploding complexity
Slashing complexity SIZE COMPLEXITY SPLIT!
Making chunks early SIZE COMPLEXITY SPLIT!
Net win? SIZE COMPLEXITY SPLIT! $ $
You’re going to do it often SIZE DOUBLE SPLIT! COMPLEXITY
NEW CODE IN ENGINE NEW CODE IN ENGINE
Never build large apps to build large apps
github.com/shageman/ the_next_big_thing
5 looser coupling 3 gems 1 one app 4 engines
8 HTTP SOA 2 modules 7 eco-system 6 services
1 The one app
HTTP://WWW.FLICKR.COM/PHOTOS/WIDNR/6589525327/
Examples ! diaspora, CF CC, canvas
If you are in the situation where you’re reading some
text, investigating, trying to figure out what is going on... That is a very good property of a detective novel and a very bad property of code. ! Martin Fowler
ANNOYANCE ENTRY STRUCTURE
2 The modularized app
HTTP://EECUE.COM/P/31426/METAL-RECYCLING-YARD.HTML
+ A higher level structure
ANNOYANCE EMAIL SIGNUP STRUCTURE
3 The gem component app
None
+ Provable independence
Choose modules that tell the story of the system and
contain a cohesive set of concepts Eric Evans
None
HTTP://WWW.SMASHINGMAGAZINE.COM/INFORMATION-AND-INSTRUCTIONAL-SIGNS-PART-1/
ANNOYANCE EMAIL SIGNUP STRUCTURE
4 The Rails component app
None
+ Provable independence for Rails
Rails Engines
EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE
5 The loosely-coupled app
None
+ Clearer responsibilities
EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE EVENT COUNTER
6 The service-oriented app
None
+ Reduced surface area
588 194 LOGGER::COUNT EVENTCOUNTER::*.METHODS.COUNT LOGGER 361 115
588 194 LOGGER::COUNT EVENTCOUNTER::*.METHODS.COUNT LOGGER 361 115 - OBJECT.METHODS LOGGER::COUNT
LOGGER 394 0 247 1
EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE EVENT COUNTER
7 The eco-system app
None
gem build event_counter..
gem push event_counter..
None
EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE EVENT COUNTER
8 The HTTP SOA app
PICTURE HERE
STRUCTURE EMAIL SIGNUP TEASER ANNOYANCE EVENT COUNTER
5 looser coupling 3 gems 1 one app 4 engines
8 HTTP SOA 2 modules 7 eco-system 6 services
5 looser coupling 3 gems 1 one app 4 engines
8 HTTP SOA 2 modules 7 eco-system 6 services
9 Architecture the reclaimed years
None
HTTP://WWW.CONFREAKS.COM/VIDEOS/759-RUBYMIDWEST2011-KEYNOTE- ARCHITECTURE-THE-LOST-YEARS
None
None
None
None
well, we just did that
EMAIL SIGNUP TEASER STRUCTURE ANNOYANCE EVENT COUNTER
Thanks! Stephan Hagemann @shageman
[email protected]