Robert Martin 1

[OOP] 'The Single Responsibility Principle' by Robert C. Martin ๋ฒˆ์—ญ

์›๊ธ€: https://blog.cleancoder.com/uncle-bob/2014/05/08/SingleReponsibilityPrinciple.html ๐Ÿ“Œ ๋ฒˆ์—ญ์ด ํ‹€๋ฆด ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์ž์˜์ ์œผ๋กœ ๋ถˆํ•„์š”ํ•˜๊ฒŒ ์—ฌ๊ฒจ์ง€๋Š” ๋ถ€๋ถ„์€ ์ œ์™ธํ–ˆ์Šต๋‹ˆ๋‹ค. ๋ณธ๋ฌธ 1972๋…„, David L. Parnas๋Š” ๋…ผ๋ฌธ์„ ์ถœ๊ฐ„ํ–ˆ๋‹ค. ๋…ผ๋ฌธ์˜ ๋งˆ์ง€๋ง‰์—์„œ ๊ทธ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ฒฐ๋ก ์„ ๋‚ด๋ฆฐ๋‹ค. ์šฐ๋ฆฌ๋Š” ํ”Œ๋กœ์šฐ์ฐจํŠธ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์‹œ์Šคํ…œ์„ ๋ชจ๋“ˆ๋กœ ๋ถ„ํ•ดํ•˜๋Š” ๊ณผ์ •์„ ์‹œ์ž‘ํ•˜๋Š” ๊ฒƒ์ด ์ž˜๋ชป๋˜์—ˆ๋‹ค๊ณ  ์ฃผ์žฅํ•ด์™”๋‹ค. ๋Œ€์‹  ์–ด๋ ต๊ฑฐ๋‚˜ ๋ณ€๊ฒฝ๋  ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋Š” ์„ค๊ณ„ ๊ฒฐ์ • ๋ชฉ๋ก์œผ๋กœ๋ถ€ํ„ฐ ์‹œ์ž‘ํ•  ๊ฒƒ์„ ์ œ์•ˆํ•œ๋‹ค. ๊ฐ ๋ชจ๋“ˆ์€ ๋‹ค๋ฅธ ๋ชจ๋“ˆ๋กœ๋ถ€ํ„ฐ ๊ทธ๋Ÿฌํ•œ ๊ฒฐ์ •์„ ์ˆจ๊ธฐ๋„๋ก ์„ค๊ณ„๋˜์–ด์•ผ ํ•œ๋‹ค. ๋‚˜๋Š” ๋งˆ์ง€๋ง‰ ๋‘ ๋ฌธ์žฅ์— ํŠนํžˆ ๊ณต๊ฐํ•œ๋‹ค. Parnas๋Š” ๋ชจ๋“ˆ์ด ๋ณ€๊ฒฝ ๊ฐ€๋Šฅ์„ฑ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ๋ถ„๋ฆฌ๋˜์–ด์•ผ ํ•œ๋‹ค๊ณ  ๋งํ•œ๋‹ค..