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
830
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
450
Redis - little helper for big applications (rus)
ptico
3
150
Other Decks in Programming
See All in Programming
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
330
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
210
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Producing Creativity
orderedlist
PRO
341
39k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
860
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
YesSQL, Process and Tooling at Scale
rocio
169
14k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
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