ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Đừng học cùng tôi! Head first design patterns - chapter 3 (29/06/2025)

Автор: Cường Mạnh

Загружено: 2025-06-29

Просмотров: 4

Описание: Tự tóm tắt:
-Thêm nguyên lý thiết kế mới (5):
1 - Encapsulate what varies.
2- Favor composition over inheritance.
3- Program to interfaces, not implementations.
4- Strive for loosely coupled designs between objects that interact.
5 - Classes should be open for extension but closed for modification. (Nguyên lý Open-Closed, code nên có thể dễ mở rộng tính năng(open cho mở rộng) nhưng mà lại không được sửa code cũ (closed cho sửa code gốc)).
/******************/
Định nghĩa Decorator pattern:
Decorator - Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
Dịch: Gắn thêm các trách nhiệm bổ sung (nhìn chung là tính năng mới) vào một đối tượng tại thời điểm chạy (runtime). Decorator cung cấp một cách mở rộng chức năng linh hoạt hơn so với việc dùng kế thừa.

Các bullet points:
Inheritance is one form of extension, but not necessarily the best way to achieve flexibility in our designs.
In our designs we should allow behavior to be extended without the need to modify existing code.
Composition and delegation can often be used to add new behaviors at runtime.
The Decorator Pattern provides an alternative to subclassing for extending behavior.
The Decorator Pattern involves a set of decorator classes that are used to wrap concrete components.
Decorator classes mirror the type of the components they decorate. (In fact, they are the same type as the components they decorate, either through inheritance or interface implementation.)
Decorators change the behavior of their components by adding new functionality before and/or after (or even in place of) method calls to the component.
You can wrap a component with any number of decorators.
Decorators are typically transparent to the client of the component—that is, unless the client is relying on the component’s concrete type.
Decorators can result in many small objects in our design, and overuse can be complex.

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Đừng học cùng tôi! Head first design patterns - chapter 3 (29/06/2025)

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

4 Hours Chopin for Studying, Concentration & Relaxation

4 Hours Chopin for Studying, Concentration & Relaxation

Но что такое нейронная сеть? | Глава 1. Глубокое обучение

Но что такое нейронная сеть? | Глава 1. Глубокое обучение

Новый мессенджер «Макс» | Что задумало государство?

Новый мессенджер «Макс» | Что задумало государство?

Why the rush? - lo-fi beats for work/study / cat jazz

Why the rush? - lo-fi beats for work/study / cat jazz

КАК УСТРОЕН TCP/IP?

КАК УСТРОЕН TCP/IP?

Японец по цене ВАЗа! Оживляем пацанскую мечту :)

Японец по цене ВАЗа! Оживляем пацанскую мечту :)

Bepul Xakerlik darslari kimlar uchun, test.

Bepul Xakerlik darslari kimlar uchun, test.

Я СДЕЛАЛ ИДЕАЛЬНЫЙ ШАР ИЗ ОБЫЧНОЙ ЗЕМЛИ - ДРЕВНЯЯ ЯПОНСКАЯ ТЕХНИКА

Я СДЕЛАЛ ИДЕАЛЬНЫЙ ШАР ИЗ ОБЫЧНОЙ ЗЕМЛИ - ДРЕВНЯЯ ЯПОНСКАЯ ТЕХНИКА

Курс по Верстке сайтов с Нуля для Начинающих [aroken.ru]

Курс по Верстке сайтов с Нуля для Начинающих [aroken.ru]

Арестович: Будет еще помощь? Итоги переговоров. Формула войны.

Арестович: Будет еще помощь? Итоги переговоров. Формула войны.

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]