Object Oriented Programing
Slide
The introduction video was also uploaded via Youtube.
SOLID principle
The S
in SOLID means 'Single Responsibility Principle'
It means the each class compose the program should have only one responsibility. For instance, imagine the class which is designed to operate actions of player. The class should not have the responsibility of other behavior such as the collision process for enemy. With this rule, the modification of player's action should be done in only one class.
The O
means 'Open Closed Principle'
In OOP programming, the all scripts were opend for the expandancy not for the modification. In the case of implementing additional features on base project, The process should be done without the revision of base project. For that reason, the base project have to be organized for the scalability. That can be said to the 'closed for the modification'. To comply with the rule, programmer should write the project by applying abstraction.
The I
means 'Interface segregation principle'
Similar with S
of SOLID, this I
works for the interface, not class. Separating the responsibility of Interface will increase the degree of neatness. In the C#, the class can be inherited the multiple interface. So the fine separation would be connected to the easy expandancy.
The L
means 'Liskov Substitution Principle'
The D
means 'Dependency Inversion Principle'
The child class should be transfrom to the parent class. To be expained easily, assume the case of method which recieve the child class(or interface) as a mediator. Abiding with upper rules, the parameter should be formed to the parent class(or interface) because the features of parameter would be invoked. But be careful with the usage of overriding.