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
600
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
860
The big, the small and the Redis
ptico
1
220
Zen TDD
ptico
2
180
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
150
Other Decks in Programming
See All in Programming
状態と共に暮らす:ステートフルへの挑戦
ypresto
3
1.1k
The Implementations of Advanced LR Parser Algorithm
junk0612
2
1.4k
音声プラットフォームのアーキテクチャ変遷から学ぶ、クラウドネイティブなバッチ処理 (20250422_CNDS2025_Batch_Architecture)
thousanda
0
400
設計の本質:コード、システム、そして組織へ / The Essence of Design: To Code, Systems, and Organizations
nrslib
10
3.7k
MySQL初心者が311個のカラムにNot NULL制約を追加していってALTER TABLEについて学んだ話
hatsu38
2
100
Ruby で作る RISC-V CPU エミュレーター / RISC-V CPU emulator made with Ruby
hayaokimura
4
420
RuboCop: Modularity and AST Insights
koic
2
2.5k
Serving TUIs over SSH with Go
caarlos0
0
600
Dissecting and Reconstructing Ruby Syntactic Structures
ydah
3
2.1k
サービスレベルを管理してアジャイルを加速しよう!! / slm-accelerate-agility
tomoyakitaura
1
200
Golangci-lint v2爆誕: 君たちはどうすべきか
logica0419
1
230
エンジニア向けCursor勉強会 @ SmartHR
yukisnow1823
3
12k
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
The World Runs on Bad Software
bkeepers
PRO
68
11k
The Invisible Side of Design
smashingmag
299
50k
The Cult of Friendly URLs
andyhume
78
6.3k
Side Projects
sachag
453
42k
Designing for Performance
lara
608
69k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
What's in a price? How to price your products and services
michaelherold
245
12k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
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