One of the hardest parts of building or wanting to build an app/software is the design. Specially having lots of design principles to follow up and understand.
Thinking on building one on your own most likely will stress you out and you will not get somewhere, there is no point on breaking your head thinking about if your design is innovative enough to fulfill the expectations of someone else or even worst trying to innovate the OO. Time has proven that principles that have been implemented actually work and those are more flexible in terms of maintenance and the future possible extensions.
Here are some of the principles that could work for you and your software:
- Open-Closed Principle: Allows you to modify the code without erasing any line, just by adding. Of course in order to be elegible it must be open for an extension otherwise it won’t work. Also it must be closed for a modification.
- DRY or more commonly known as Do not repeat yourself: Is a principle that focus on avoiding duplicate code that could potentially be repeated. Mainly focuses on abstract things that are usually located in a single location.
- LSP: Liskov Principle is mainly focus on the subtypes which must be able to be substituted for any given base type without breaking the code and its functions.
- SRP: We can relate this principle with two brothers. If the younger brother gets harmed the responsibility would be of the older brother. Same goes for the objects, this way we know which class would affect the other amd be responsible.