Template Method Design Pattern

preview_player
Показать описание

Welcome to my Template Method Design Pattern Tutorial. It is an extremely easy design pattern to understand and use.

With this pattern, you define a method (algorithm) in an abstract class. It contains both abstract methods and non-abstract methods. The subclasses that extend this abstract class then override those methods that don't make sense for them to use in the default way.

It may sound complicated, but it definitely isn't. It is also extremely useful. Look at the code above to get a complete understanding quickly.
Рекомендации по теме
Комментарии
Автор

After 9 years, and still the best tutorial on software design intro on the internet. Thank you, Derek!

benjaminbrodeur
Автор

Thank you :) You're very kind. I'm just happy that you enjoy the videos. I don't require anything else. I'm actually more popular in India and South Africa then I am in my country. I was amazed when I discovered that!

derekbanas
Автор

derek imma be honest with u, ive been watching your videos for 12 hours straight on a crunch to finish a college assignment, so I dont want to hear your voice anymore today... but your videos are great well done!

donmrx
Автор

Thank you very much :) I haven't covered C# yet mainly because I decided about 2 years ago to make different tutorials from everyone else on YouTube. I see no point in making the same 5 minute tutorials that everyone else makes. That is why I tend to make 15 to 30 minute videos with all the pauses removed (Most are 45 to an hour before editing). I also decided to make grand tutorials that cover everything. To do that I had to give up on briefly covering topics. I'll cover C# some day :)

derekbanas
Автор

Hey man. I'm sitting here reading up on an exam on software design patterns, and i just watched your videos on the strategy pattern and the template pattern. I guess i just wanted to say thanks for these videos, they're really well made!
They're easy to understand, and the length and level of detail is just perfect. Cheers! :)

trolden
Автор

this tutorial made me really hungry. That sandwich sounds awesome.

danobot
Автор

Thank you brO!! Got an exam on design patterns wednesday !

jaxt
Автор

Excellent Derek, you made very difficult to understand patterns very simple. It's worth much more. Thank you.

venkatats
Автор

Wow..Wow.. I didn't check well. Man, I can't believe your doing this all for free. I really appreciate your work. God bless you!

prmaster
Автор

Thank you for your time and dedication in creating these tutorials. I appreciate it a lot !

MrAnonimR
Автор

Yes you could definitely optimize the code. I cover that in my refactoring tutorials. My main focus here was to make the main parts of the pattern understandable. I hope that makes sense

derekbanas
Автор

2024 learning here and getting value from your videos 😍 Thanks for your great work👏

chandup
Автор

I use Eclipse mainly because it looks the same on every OS. Being free also is nice :) I have continued to use Eclipse Indigo because Eclipse Juno is buggy. Do a search for Eclipse Indigo and you'll find it. I specifically use Eclipse Classic Indigo Service Release 2

derekbanas
Автор

Simple and easy to learn - Thank for the tutorial

mailshiva
Автор

Perfectly clear.  Perfectly engaging.  Perfectly applicable to the subject matter.

Perfect video.

spaarks
Автор

Derek! You are the answer to my prayers!!
If I ever meet you(I stay in india, btw), I owe you a cup of coffee atleast!

vbnandu
Автор

Folks, this guy knows what he is talking about. Thanks again :)

xipity
Автор

Bless you as well :) I'm glad you find it useful

derekbanas
Автор

You're very welcome :) I'm using java in this tutorial

derekbanas
Автор

Hi Derek, thank you again for this nice tutorial!
You explained it very well. I commented yesterday one video of yours, that I was studying for my exam in software engineering. Well today when i watched this video, I was also studying, but you talked so much about sandwiches that I took my car keys and drove to subway (sandwich restaurant)..  :P

KingMartinelli