-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLID #14
Comments
νλ‘κ·Έλλ¨Έκ° μκ°μ΄ μ§λλ μ μ§ λ³΄μμ νμ₯μ΄ μ¬μ΄ μμ€ν
μ λ§λ€κ³ μ ν λ μ΄ μμΉλ€μ ν¨κ» μ μ©ν μ μμ΅λλ€. μ¦, κ°μ²΄ μ€κ³μ νμν 5κ°μ§ μμΉμΌλ‘μ¨ μ μ§λ³΄μκ° μ½κ³ , μ μ°νκ³ , νμ₯μ΄ μ¬μ΄ μννΈμ¨μ΄λ₯Ό λ§λ€κΈ° μν μλ¨ 1. SRP (Single Responsibility) - λ¨μΌ μ± μ μμΉ
2. OCP (Open-Closed) - κ°λ°©-νμ μμΉ
3. LSP (Liskov Substitution) - 리μ€μ½ν μΉν μμΉ
4. ISP (Interface Segregation) - μΈν°νμ΄μ€ λΆλ¦¬ μμΉ
5. DIP (Dependency Inversion) - μμ‘΄ μμ μμΉ
|
SOLID μμΉκ°μ²΄ μ§ν₯ νλ‘κ·Έλλ° μ μ§μΌμΌ ν SRP, OCP, LSP, ISP, DIP μμΉμ μ 리ν μ©μ΄μ΄λ€.S: Single Responsibility Principle
O: Open - Close Principle
L: Liskov Substitution Principle
I: Interface Segregation Principle
D: Dependency Inversion Principle
|
SOLIDSOLIDλ? κ°μ²΄ μ§ν₯ νλ‘κ·Έλ¨ λ° μ€κ³μ λ€μ―κ°μ§ κΈ°λ³Έ μμΉ
|
SOLID μμΉSOLIDλ κ°μ²΄μ§ν₯μ 5κ°μ§ μμΉμ μλ―Έ
Single Responsibility Principleλͺ¨λ λͺ¨λμ λ¨ νλμ μ± μμ κ°μ ΈμΌ νλ€λ κ². Open/Closed principleextensionμλ κ°λ°©, μμ μλ νμ Liskov Substitution Principleλ² μ΄μ€ ν΄λμ€μ ν¬μΈν°λ μ°Έμ‘°λ₯Ό μ¬μ©νλ ν¨μλ λ°λμ νμλ ν΄λμ€μ κ°μ²΄λ₯Ό (μμ§λͺ»νλλΌλ) μ¬μ©ν μ μμ΄μΌνλ€. Interface Segregation Principle (ISP)ν΄λΌμ΄μΈνΈλ μ¬μ©νμ§ μλ μΈν°νμ΄μ€λ₯Ό ꡬννμ§ μμμΌνλ κ². νλμ ν° μΈν°νμ΄μ€λ³΄λ€, κ°κ° νλμ μμ μλΈλͺ¨λμ μ 곡νλ λ©μλ κ·Έλ£Ήμ μμ μΈν°νμ΄μ€κ° λ§μ κ²μ΄ λ μ νΈλ¨. Dependency Inversion Principleμμλ 벨 λͺ¨λμ νμλ 벨 λͺ¨λμ μμ‘΄ν΄μλ μλλ©°, λ λ€ μΆμνμ μμ‘΄ν΄μΌνλ€. μΆμνλ μΈλΆμ¬νμ μμ‘΄νλ κ²μ΄ μλλΌ, μΈλΆμ¬νμ΄ μΆμνμ μμ‘΄ν΄μΌ νλ€. |
SRP(Single Responsiblity Principle) - λ¨μΌ μ± μ μμΉ
OCP(Open-Closed Principle) - κ°λ°©-ν¨μ μμΉ
LSP(Liskov Substitution Principle) - 리μ€μ½ν μΉν μμΉ
ISP(Interface Segregation Principle) - μΈν°νμ΄μ€ λΆλ¦¬ μμΉ
DIP(Dependency Inversion Principle) - μμ‘΄κ΄κ³ μμ μμΉ
|
ποΈ λ§κ°μΌ
2023.01.29
π μ°Έμ¬μ
The text was updated successfully, but these errors were encountered: