<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>toshiyuki_saito</author_name>
  <author_url>https://blog.hatena.ne.jp/toshiyuki_saito/</author_url>
  <blog_title>個人事業主のつぶやき</blog_title>
  <blog_url>https://toshiyuki-saito.hatenadiary.org/</blog_url>
  <categories>
    <anon>デザパタ</anon>
  </categories>
  <description>さて、今日は短めに行きます。TemplateMethodはデザインパターンの中でも初めの方に出てくるパターンですね。継承とはこういうときにこそ使う意義があると教えてくれます。機能拡張のための継承ははっきり言って悪です。機能拡張をするなら、継承ではなく、委譲を使いましょう。とそれはおいといて、TemplateMethodパターンの概要ですが、AppletやServletをかじったことがある人ならすぐ分かると思います。まさにあの作り方がTemplateMethodパターンに等しいからです。TemplateMethodパターンとは、共通箇所をくくりだし、クラスを定義し、拡張箇所をメソッドとしてくくり…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftoshiyuki-saito.hatenadiary.org%2Fentry%2F20061224%2F1166958285&quot; title=&quot;デザインパターン[TemplateMethod] - 個人事業主のつぶやき&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2006-12-24 20:04:45</published>
  <title>デザインパターン[TemplateMethod]</title>
  <type>rich</type>
  <url>https://toshiyuki-saito.hatenadiary.org/entry/20061224/1166958285</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
