Город МОСКОВСКИЙ
00:04:23

The Template Method Pattern in Ruby

Аватар
Техно-Хакер
Просмотры:
26
Дата загрузки:
05.12.2023 09:18
Длительность:
00:04:23
Категория:
Обучение

Описание

The Template Method pattern allows you to extract the parts of your code that stay the same into a base class and the ones that change into subclasses.

This structure allows you to provide different variations of an algorithm by simply adding new subclasses, and never having to touch the base class, or the existing subclasses.

0:00 - Introduction
1:10 - How does it work
1:49 - Code example
2:38 - Applying the pattern
3:57 - Helpful resources

? Buy my Bulletproof Ruby on Rails Applications eBook: https://j.mp/2OtFCdR

? The Factory Method Pattern: https://youtu.be/G63BRtGLcw4

? Ruby design patterns playlist: https://youtube.com/playlist?list=PLBhH0uX92r6oP8r-oSY_b8_2EnK0Z1Fkz

You can subscribe to the channel using this link: https://www.youtube.com/mixandgo?sub_confirmation=1

My website: https://mixandgo.com

Github Repo: https://github.com/mixandgo/template_pattern

https://en.wikipedia.org/wiki/Template_method_pattern

If you want to learn more about design patterns, check out these two books.

? Design Patterns: Elements of Reusable Object-Oriented Software: https://amzn.to/3vZ7sjp

? Head First Design Patterns: Building Extensible and Maintainable Object-Oriented Software 2nd Edition: https://amzn.to/3bvBiCF


#webdev #ruby #designpatterns #templatemethod

Рекомендуемые видео