Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Reclaim your architecture @ sbonrails
shagemann
February 12, 2014
Technology
1
82
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
Structural Engineering in Ruby
shagemann
0
510
Productize Your Services! @ springone 2017
shagemann
0
540
Software Components @ RUG-B
shagemann
0
560
Boulder Ruby Group Beginner's Track - What to Do Next?
shagemann
0
66
GET STARTED WITH COMPONENT-BASED RAILS APPLICATIONS! @ Rocky Mountain Ruby 2015
shagemann
1
110
Get started with Component-Based Rails @ RailsConf 2015
shagemann
3
790
Refactoring towards Component-based Rails Architectures @ RailsConf 2014
shagemann
5
950
The Rich, Flowers, and Piles of Sh%#t - And What To Do About It
shagemann
0
46
Active Record Model Dependencies
shagemann
0
91
Other Decks in Technology
See All in Technology
ML PM, DS PMってどんな仕事をしているの?
line_developers
PRO
1
220
OpenShiftのリリースノートを整理してみた
loftkun
2
290
400種類のWeb APIをサポートしているデータパイプラインツールにおけるWeb APIとの共存戦略
cdataj
0
160
CUEとKubernetesカスタムオペレータを用いた新しいネットワークコントローラをつくってみた
hrk091
1
270
ChatGPT for Hacking
anugrahsr
0
3.9k
NGINXENG JP#2 - 3-NGINX Plus・プロダクトのアップデート
hiropo20
0
200
オンプレk8sとEKSの並行運用の実際
ch1aki
0
230
データ分析基盤の要件分析の話(202201_JEDAI)
yabooun
0
220
230125 モニターマウントLT ITガジェット翁(Ryu.Cyber)さん
comucal
PRO
0
4.5k
API連携に伴う規制と対応 / Regulations and responses to API linkage
moneyforward
0
150
Oracle Cloud Infrastructure:2023年1月度サービス・アップデート
oracle4engineer
PRO
0
130
AI Builderについて
miyakemito
0
860
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
233
9.7k
The World Runs on Bad Software
bkeepers
PRO
59
5.7k
Code Review Best Practice
trishagee
50
11k
Put a Button on it: Removing Barriers to Going Fast.
kastner
56
2.5k
JazzCon 2018 Closing Keynote - Leadership for the Reluctant Leader
reverentgeek
175
9.1k
4 Signs Your Business is Dying
shpigford
171
20k
StorybookのUI Testing Handbookを読んだ
zakiyama
8
3.2k
WebSockets: Embracing the real-time Web
robhawkes
58
6k
Faster Mobile Websites
deanohume
295
29k
From Idea to $5000 a Month in 5 Months
shpigford
374
44k
How to train your dragon (web standard)
notwaldorf
66
4.2k
Documentation Writing (for coders)
carmenintech
51
2.9k
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]