Private by Default: A Simple Design Rule
Автор: DevRunDown
Загружено: 2026-01-02
Просмотров: 223
In this video, I walk through a simple design rule I follow in almost every class: defaulting properties and methods to private.
Using a small example in PHP, I show how protected methods quietly become part of your API, how subclasses start depending on internal details, and why that makes refactoring harder over time.
I also talk about:
– why protected methods are still a long-term responsibility
– how encapsulation creates healthier extension points
– and why needing to test private methods can be a design signal
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: