Skip to content

Files

Latest commit

b79e663 · Oct 30, 2023

History

History

template

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 30, 2023
Feb 27, 2021
Feb 27, 2021
Feb 27, 2021
Feb 27, 2021
Feb 27, 2021

README.md

Template Method Design Pattern

Videos

Section Video Links
Template Method Overview Template Method Overview   Template Method Overview   Template Method Overview
Template Method Use Case Template Method Use Case   Template Method Use Case   Template Method Use Case

Book

Cover Links
Design Patterns In Python (ASIN : B08XLJ8Z2J)   https://www.amazon.com/dp/B08XLJ8Z2J
  https://www.amazon.co.uk/dp/B08XLJ8Z2J
  https://www.amazon.in/dp/B08Z282SBC
  https://www.amazon.de/dp/B08XLJ8Z2J
  https://www.amazon.fr/dp/B08XLJ8Z2J
  https://www.amazon.es/dp/B08XLJ8Z2J
  https://www.amazon.it/dp/B08XLJ8Z2J
  https://www.amazon.co.jp/dp/B08XLJ8Z2J
  https://www.amazon.ca/dp/B08XLJ8Z2J
  https://www.amazon.com.au/dp/B08Z282SBC

Overview

... Refer to Book or Design Patterns In Python website to read textual content.

Terminology

... Refer to Book or Design Patterns In Python website to read textual content.

Template Method UML Diagram

Template Method UML Diagram

Source Code

... Refer to Book or Design Patterns In Python website to read textual content.

Output

python ./template/template_concept.py
Class_A : Step Two (overridden)
Step Three is a hook that prints this line by default.
Class_B : Step One (overridden)
Class_B : Step Two. (overridden)
Class_B : Step Three. (overridden)

Template Method Example Use Case

... Refer to Book or Design Patterns In Python website to read textual content.

Template Method Use Case UML Diagram

Template Method Use Case UML Diagram

Output

python ./template/client.py
----------------------
title   : New Text Document
background_colour       : white
text    : Some Text
footer  : -- Page 1 --

<html>
  <head>
    <title>New HTML Document</title>
    <style>
      body {
        background-color: white;
      }
    </style>
  </head>
  <body>
    <p>Line 1</p>
    <p>Line 2</p>
  </body>
</html>

Summary

... Refer to Book or Design Patterns In Python website to read textual content.