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
590
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
800
The big, the small and the Redis
ptico
1
220
Zen TDD
ptico
2
180
The Application: An Unexpected Journey
ptico
1
280
The scary fairy tale about MVC or How to stop worrying and start to write ruby code
ptico
3
260
How to f*ck up the refactoring
ptico
11
440
Redis - little helper for big applications (rus)
ptico
3
140
Other Decks in Programming
See All in Programming
雑に思考を整理する技術と効能
konifar
60
29k
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
750
コーンフレークから始める モデリング会話入門
ogurotakayuki
0
370
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
8
4.1k
Kotlin Multiplatform at Stable and Beyond (Android Makers 2024)
zsmb
0
270
ゆるい個人開発のススメ
kuroppe1819
10
990
Blue/Greenデプロイの導入による 運用フローの改善
kudoas
1
380
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
490
TCAとKMPを用いた新規動画配信アプリ 「ABEMA Live」の設計
tomu28
1
110
Fragment Composition of GraphQL
quramy
7
1k
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.7k
Ruby Function Composition
bkuhlmann
1
330
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
331
56k
The Illustrated Children's Guide to Kubernetes
chrisshort
31
46k
4 Signs Your Business is Dying
shpigford
175
21k
Building Applications with DynamoDB
mza
88
5.6k
Ruby is Unlike a Banana
tanoku
96
10k
[RailsConf 2023] Rails as a piece of cake
palkan
23
4k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
Side Projects
sachag
451
41k
Designing Experiences People Love
moore
136
23k
Creatively Recalculating Your Daily Design Routine
revolveconf
210
11k
In The Pink: A Labor of Love
frogandcode
138
21k
Fireside Chat
paigeccino
21
2.6k
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