<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>katzchang</author_name>
  <author_url>https://blog.hatena.ne.jp/katzchang/</author_url>
  <blog_title>@katzchang.contexts</blog_title>
  <blog_url>https://katzchang.hatenadiary.org/</blog_url>
  <categories>
    <anon>設計論</anon>
  </categories>
  <description>条件分岐箇所が少ない コード量が少ない 外部ライブラリへの依存度（質と量）が小さい オープン・クローズの原則（OCP）に沿っている 3つしか思いつかなかった＞＜4つにした。条件分岐箇所が少ないということは、振る舞いの場合分けが単純化されているってことで、試験性や保守性が高い。オブジェクトの多態によって振る舞いを切り替える場合も、インスタンスの取得時に条件分岐を集中させ、個別のメソッドでは条件分岐させないようにしている。トレードオフになる部分もある。外部ライブラリを使わないようにすれば外部依存の量は減るが、コードの量が増える。外部ライブラリへのアダプターを用意すると依存の質は向上するかも知れない…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkatzchang.hatenadiary.org%2Fentry%2F20081211%2Fp1&quot; title=&quot;同じ振る舞いをするコードのどちらを採用するべきかの判断基準を整理してみる - @katzchang.contexts&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>2008-12-11 00:00:01</published>
  <title>同じ振る舞いをするコードのどちらを採用するべきかの判断基準を整理してみる</title>
  <type>rich</type>
  <url>https://katzchang.hatenadiary.org/entry/20081211/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
