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
Practical SOLID with Rails
Search
Andrey Savchenko
February 23, 2013
Programming
5
610
Practical SOLID with Rails
Ruby Meditation s.1, e.1, Kiev
Andrey Savchenko
February 23, 2013
Tweet
Share
More Decks by Andrey Savchenko
See All by Andrey Savchenko
Building web-API without Rails, registration or sms
ptico
3
880
The big, the small and the Redis
ptico
1
230
Zen TDD
ptico
2
190
The Application: An Unexpected Journey
ptico
1
290
The scary fairy tale about MVC or How to stop worrying and start to write ruby code
ptico
3
270
How to f*ck up the refactoring
ptico
11
450
Redis - little helper for big applications (rus)
ptico
3
160
Other Decks in Programming
See All in Programming
ポスターセッション: 「まっすぐ行って、右!」って言ってラズパイカーを動かしたい 〜生成AI × Raspberry Pi Pico × Gradioの試作メモ〜
komofr
0
900
Build your own WebP codec in Swift
kishikawakatsumi
2
870
iOSDC.pdf
chronos2500
2
650
私はどうやって技術力を上げたのか
yusukebe
43
17k
Local Peer-to-Peer APIはどのように使われていくのか?
hal_spidernight
2
430
dynamic!
moro
9
5.4k
複雑化したリポジトリをなんとかした話 pipenvからuvによるモノレポ構成への移行
satoshi256kbyte
1
720
Pythonスレッドとは結局何なのか? CPython実装から見るNoGIL時代の変化
curekoshimizu
4
1.2k
AccessorySetupKitで実現するシームレスなペアリング体験 / Seamless pairing with AccessorySetupKit
nekowen
0
210
半自動E2Eで手っ取り早くリグレッションテストを効率化しよう
beryu
6
2.4k
WebエンジニアがSwiftをブラウザで動かすプレイグラウンドを作ってみた
ohmori_yusuke
0
170
麻雀点数計算問題生成タスクから学ぶ Single Agentの限界と Agentic Workflowの底力
po3rin
5
2k
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
4.8k
Being A Developer After 40
akosma
91
590k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
Scaling GitHub
holman
463
140k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Rails Girls Zürich Keynote
gr2m
95
14k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Done Done
chrislema
185
16k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
53k
Producing Creativity
orderedlist
PRO
347
40k
Designing for Performance
lara
610
69k
Transcript
Practical SOLID with Rails Andrey Savchenko CTO @ Aejis Tuesday,
March 19, 13
Let’s start the our new, awesome project! Tuesday, March 19,
13
class < ActiveRecord::Base belongs_to :company has_many :products has_many :warehouses validates_presence_of
:name end Tuesday, March 19, 13
Tuesday, March 19, 13
10 months later... Tuesday, March 19, 13
Tuesday, March 19, 13
Tuesday, March 19, 13
SOLID Tuesday, March 19, 13
SOLID • Single responsibility principle • Open-Closed principle • Liskov
substitution principle • Interface segregation principle • Dependency inversion principle Tuesday, March 19, 13
SRP • Easy to read • Easy to change •
Easy to reuse No god objects Tuesday, March 19, 13
Tuesday, March 19, 13
Tuesday, March 19, 13
Tuesday, March 19, 13
Tuesday, March 19, 13
Tuesday, March 19, 13
Tuesday, March 19, 13
Tuesday, March 19, 13
Tuesday, March 19, 13
Tuesday, March 19, 13
Tuesday, March 19, 13
PROFIT!? Tuesday, March 19, 13
So much objects? NO! Tuesday, March 19, 13
YES! • https://github.com/drapergem/draper • https://github.com/mbj/aequitas • https://github.com/Ptico/resourced • https://github.com/bogdan/datagrid Tuesday,
March 19, 13
OCP Tuesday, March 19, 13
Tuesday, March 19, 13
Tuesday, March 19, 13
LSP Tuesday, March 19, 13
ISP Tuesday, March 19, 13
DI Tuesday, March 19, 13
Tuesday, March 19, 13
Tuesday, March 19, 13
Picture with cat Because everyone loves cats <3 Tuesday, March
19, 13
Questions? • Twitter: @ptico • Github: @ptico Tuesday, March 19,
13