← Winnitude! Search  ·  Reader Mode (767 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 42 LINKS

GitHub - HowProgrammingWorks/ObjectOrientedProgramming: Object-oriented programming

Repository navigation

ObjectOrientedProgramming
Public

About

Object-oriented programming

www.youtube.com/TimurShemsedinov

Resources

Readme MIT license Activity Custom properties

Stars

5 stars

Watchers

4 watching

Forks

4 forks Report repository
Branches

Tags
Go to Branches page Go to Tags page

Latest commit

 

History


31 Commits
View commit history for this file.

Folders and files

Name Name Last commit message Last commit date
JavaScript JavaScript    
.editorconfig .editorconfig    
.gitignore .gitignore    
LICENSE LICENSE    
README.md README.md    
eslint.config.js eslint.config.js    
package-lock.json package-lock.json    
package.json package.json    
prettier.config.js prettier.config.js    

Repository files navigation

Object-oriented programming

OOP principles

  1. Abstraction -- encapsulate internals, isolate complexity, expose interface, and hide details.
  2. Class -- user-defined type representing an abstraction; encapsulates state and behavior to improve code reuse.
  3. Encapsulation -- bind data with its behavior and expose only a minimal interface.
  4. Inheritance -- extend functionality, and narrow type; derive specialized subtypes from a base to reuse and extend behavior.
  5. Polymorphism -- same call, different implementations; let each receiver provide its own.
  6. Structural Composition -- build higher-level, more complex abstractions by combining smaller collaborating parts.
  7. Aggregation -- a whole references parts with an independent lifecycle; loose ownership.
  8. Separation of Concerns -- isolate responsibilities by separate implementations to reduce coupling and cognitive complexity.
  9. Dependency Injection -- pass dependencies from outside (via constructor, fields, or setters) and store them in fields.
  10. Tell, Don't Ask -- give objects the job themselves rather than pulling out their data and doing the work elsewhere.
  11. Mutable vs Immutable -- prefer state that never changes after creation for safety; prefer mutable state for performance and memory optimization.
  12. Duck Typing -- rely on contracts and object compatibility by behavior rather than inheritance hierarchy.
  13. Entity vs Value Object -- entities are tracked by ID, values by content equality.
  14. Delegation -- forward work to a collaborator (separate abstraction) for code reuse or flexibility.
  15. Information Hiding -- keep state private, expose only controlled behavior.
  16. Law of Demeter (LoD) -- talk only to your immediate collaborators; avoid deep access by multiple dots.
  17. Generics -- parametric types that let code be written once and reused for many concrete types while preserving type safety.
  18. Resource allocation: Constructor, destructor, disposable -- a constructor acquires resources; a destructor releases resources automatically at object end-of-life; a disposable is an explicit protocol to release unmanaged resources deterministically.

Old lectures

About

Object-oriented programming

www.youtube.com/TimurShemsedinov

Resources

Readme MIT license Activity Custom properties

Stars

5 stars

Watchers

4 watching

Forks

4 forks Report repository

Releases

Packages

Contributors

Languages