Skip to content

Latest commit

 

History

History
45 lines (37 loc) · 1.35 KB

7570b661.md

File metadata and controls

45 lines (37 loc) · 1.35 KB
slug title tags date
design-principle-1
Design Principle 1
zettel
design-principle-1
computer-science
programming
oop
design-principle
computer-science/programming
computer-science/programming/oop
computer-science/programming/oop/design-principle
object-oriented-programming
head-first-design-pattern
book
book/head-first-design-pattern
elisabeth-freeman
kathy-sierra
elisabeth-freeman-and-kathy-sierra
2021-07-29T21:28

#[[810c5d55]] design principle

"Identify the aspects of your application that vary and separate them from what stays the same."

This design principle is very important as object oriented programming, while it promises logical encapsulation and convenient code reuse, it is wise and more efficient to separate parts of a class that varies and encapsulate them from the parts that are constant. Doing so makes it easier to maintain and modify the varying parts without affecting those that don't.

Not everything that relates to a particular class needs to be in the same scope as the class for the sake of relation and coherence. Often times it becomes a problem when it comes to maintainability, as programmers spend most of their time maintaining rather than building the code from scratch.

[^]

Resources

[^]: Head First Design Pattern by Elisabeth Freeman and Kathy Sierra