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
840
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
260
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
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
6
1.4k
“あなた” の開発を支援する AI エージェント Bedrock Engineer / introducing-bedrock-engineer
gawa
6
560
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
570
return文におけるstd::moveについて
onihusube
1
1.4k
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
630
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
240
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
280
令和7年版 あなたが使ってよいフロントエンド機能とは
mugi_uno
11
5.3k
Jaspr Dart Web Framework 박제창 @Devfest 2024
itsmedreamwalker
0
150
ASP.NET Core の OpenAPIサポート
h455h1
0
120
Package Traits
ikesyo
1
210
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
110
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
30
2.1k
A Tale of Four Properties
chriscoyier
157
23k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Making Projects Easy
brettharned
116
6k
Optimizing for Happiness
mojombo
376
70k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
Measuring & Analyzing Core Web Vitals
bluesmoon
5
210
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
240
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
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