{"id":7112,"date":"2025-10-02T08:30:55","date_gmt":"2025-10-01T23:30:55","guid":{"rendered":"https:\/\/blog.since2020.jp\/?p=7112"},"modified":"2026-09-29T11:11:48","modified_gmt":"2026-09-29T02:11:48","slug":"decorator-pattern_glossary","status":"publish","type":"post","link":"https:\/\/since2020.jp\/media\/decorator-pattern_glossary\/","title":{"rendered":"\u30c7\u30b3\u30ec\u30fc\u30bf\u30d1\u30bf\u30fc\u30f3\u518d\u8003\uff1a\u67d4\u8edf\u306a\u6a5f\u80fd\u62e1\u5f35\u3092\u5b9f\u73fe\u3059\u308b\u73fe\u4ee3\u7684\u8a2d\u8a08\u3068\u306f"},"content":{"rendered":"\n<p>\u30c7\u30b3\u30ec\u30fc\u30bf\u30d1\u30bf\u30fc\u30f3\u306e\u57fa\u672c\u304b\u3089\u3001\u7d99\u627f\u3068\u306e\u9055\u3044\u3001Python\u30fbTypeScript\u30fbJava\u306a\u3069\u3067\u306e\u5b9f\u8df5\u3001API\u3084\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3078\u306e\u5fdc\u7528\u3001\u8a2d\u8a08\u4e0a\u306e\u6ce8\u610f\u70b9\u307e\u3067\u3092\u89e3\u8aac\u3002\u73fe\u4ee3\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u958b\u767a\u3067\u30c7\u30b3\u30ec\u30fc\u30bf\u304c\u679c\u305f\u3059\u5f79\u5272\u3092\u3001\u5358\u306a\u308b\u300c\u6a5f\u80fd\u8ffd\u52a0\u300d\u306e\u67a0\u3092\u8d85\u3048\u3066\u8003\u5bdf\u3057\u307e\u3059\u3002<\/p>\n\n\n<h2>\u306f\u3058\u3081\u306b\uff1a\u30c7\u30b3\u30ec\u30fc\u30bf\u306f\u300c\u6a5f\u80fd\u3092\u8db3\u3059\u300d\u3060\u3051\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u306f\u306a\u3044<\/h2>\n<p>\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u958b\u767a\u3067\u306f\u3001\u65e2\u5b58\u306e\u30af\u30e9\u30b9\u3084\u30b5\u30fc\u30d3\u30b9\u306b\u300c\u30ed\u30b0\u3092\u8ffd\u52a0\u3057\u305f\u3044\u300d\u300c\u8a8d\u8a3c\u3092\u52a0\u3048\u305f\u3044\u300d\u300c\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u305f\u3044\u300d\u3068\u3044\u3063\u305f\u8981\u6c42\u304c\u983b\u7e41\u306b\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n<p>\u5358\u7d14\u306b\u7d99\u627f\u3067\u5bfe\u5fdc\u3059\u308b\u3068\u3001\u6a5f\u80fd\u306e\u7d44\u307f\u5408\u308f\u305b\u304c\u5897\u3048\u308b\u307b\u3069\u30b5\u30d6\u30af\u30e9\u30b9\u304c\u5897\u3048\u3001\u30b3\u30fc\u30c9\u69cb\u9020\u304c\u8907\u96d1\u306b\u306a\u308a\u304c\u3061\u3067\u3059\u3002\u305d\u3053\u3067\u6709\u52b9\u306a\u306e\u304c**\u30c7\u30b3\u30ec\u30fc\u30bf\u30d1\u30bf\u30fc\u30f3\uff08Decorator Pattern\uff09**\u3067\u3059\u3002<\/p>\n<p>\u30c7\u30b3\u30ec\u30fc\u30bf\u306fGoF\u306e\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u306e\u4e00\u3064\u3067\u3001\u5bfe\u8c61\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5225\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u5305\u307f\u3001\u305d\u306e\u524d\u5f8c\u306b\u65b0\u3057\u3044\u51e6\u7406\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002\u91cd\u8981\u306a\u306e\u306f\u3001\u5143\u306e\u30af\u30e9\u30b9\u305d\u306e\u3082\u306e\u3092\u5909\u66f4\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001**\u300c\u30e9\u30c3\u30d7\u3057\u3066\u632f\u308b\u821e\u3044\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u300d**\u3068\u3044\u3046\u767a\u60f3\u3067\u3059\u3002\u73fe\u5728\u3067\u3082\u69cb\u9020\u30d1\u30bf\u30fc\u30f3\u306e\u4ee3\u8868\u4f8b\u3068\u3057\u3066\u6574\u7406\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: 2f7c0df1-c9fd-41f1-b669-8d30ee50461e --><\/p>\n<h2>\u30c7\u30b3\u30ec\u30fc\u30bf\u30d1\u30bf\u30fc\u30f3\u3068\u306f\uff1f<\/h2>\n<p>\u57fa\u672c\u69cb\u9020\u306f\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u3002<\/p>\n<p><strong>Component<\/strong>\u304c\u5171\u901a\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5b9a\u7fa9\u3057\u3001<strong>Concrete Component<\/strong>\u304c\u57fa\u672c\u6a5f\u80fd\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002\u305d\u3057\u3066<strong>Decorator<\/strong>\u304cComponent\u3092\u4fdd\u6301\u3057\u3001<strong>Concrete Decorator<\/strong>\u304c\u8ffd\u52a0\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u300c\u901a\u77e5\u3092\u9001\u4fe1\u3059\u308b\u300d\u6a5f\u80fd\u3092\u8003\u3048\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><code>Notifier\n   \u2193\nLoggingDecorator\n   \u2193\nAuthDecorator\n   \u2193\nRetryDecorator\n   \u2193\nEmailNotifier\n<\/code><\/pre>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u898b\u308b\u3068\u3001\u6700\u7d42\u7684\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u3059\u3079\u3066\u540c\u3058Component\u3068\u3057\u3066\u6271\u3048\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30b3\u30ec\u30fc\u30bf\u306e\u91cd\u8981\u306a\u7279\u5fb4\u306f\u3001<strong>\u30c7\u30b3\u30ec\u30fc\u30bf\u81ea\u8eab\u304c\u540c\u3058\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5b9f\u88c5\u3057\u3001\u305d\u306e\u5185\u90e8\u306b\u5225\u306eComponent\u3092\u4fdd\u6301\u3059\u308b\u3053\u3068<\/strong>\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u306e\u4e0a\u306b\u3055\u3089\u306b\u5225\u306e\u30c7\u30b3\u30ec\u30fc\u30bf\u3092\u91cd\u306d\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u7d99\u627f\u3068\u306e\u5927\u304d\u306a\u9055\u3044\u3067\u3059\u3002\u7d99\u627f\u3067\u306f\u300c\u3069\u306e\u30af\u30e9\u30b9\u3092\u89aa\u306b\u3059\u308b\u304b\u300d\u304c\u69cb\u9020\u3068\u3057\u3066\u56fa\u5b9a\u3055\u308c\u307e\u3059\u304c\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u3067\u306f\u5b9f\u884c\u6642\u306b\u5fc5\u8981\u306a\u6a5f\u80fd\u3092\u7d44\u307f\u5408\u308f\u305b\u3089\u308c\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: 6e8b5c44-8b9f-4059-bf31-8f5d0521ec27 --><\/p>\n<h2>\u306a\u305c\u73fe\u4ee3\u306e\u958b\u767a\u3067\u3082\u91cd\u8981\u306a\u306e\u304b<\/h2>\n<p>\u30c7\u30b3\u30ec\u30fc\u30bf\u306e\u4fa1\u5024\u306f\u3001\u5358\u7d14\u306a\u300c\u88c5\u98fe\u300d\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u73fe\u4ee3\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u305d\u306e\u3082\u306e\u306b\u52a0\u3048\u3066\u3001\u30ed\u30b0\u3001\u8a8d\u8a3c\u3001\u76e3\u8996\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3001\u30ea\u30c8\u30e9\u30a4\u3001\u30e1\u30c8\u30ea\u30af\u30b9\u3001\u30c8\u30ec\u30fc\u30b7\u30f3\u30b0\u306a\u3069\u3001\u591a\u304f\u306e<strong>\u6a2a\u65ad\u7684\u95a2\u5fc3\u4e8b<\/strong>\u3092\u6271\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u3092\u3059\u3079\u3066\u672c\u4f53\u30af\u30e9\u30b9\u306b\u8a18\u8ff0\u3059\u308b\u3068\u30011\u30af\u30e9\u30b9\u306e\u8cac\u52d9\u304c\u81a8\u5f35\u3057\u307e\u3059\u3002<\/p>\n<p>\u4e00\u65b9\u3001\u51e6\u7406\u3092<\/p>\n<pre><code>Logging\n  \u2192 Authentication\n    \u2192 Retry\n      \u2192 Cache\n        \u2192 Business Logic\n<\/code><\/pre>\n<p>\u306e\u3088\u3046\u306b\u5206\u96e2\u3059\u308c\u3070\u3001\u305d\u308c\u305e\u308c\u306e\u5f79\u5272\u3092\u72ec\u7acb\u3057\u3066\u7ba1\u7406\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8003\u3048\u65b9\u306f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3060\u3051\u3067\u306a\u304f\u3001API\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3084\u95a2\u6570\u5408\u6210\u306a\u3069\u3001\u73fe\u4ee3\u7684\u306a\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u8a2d\u8a08\u306b\u3082\u81ea\u7136\u306b\u3064\u306a\u304c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: ec21ff00-c80c-4972-9585-d9c553db8bcc --><\/p>\n<p><!-- notionvc: fa4d48d8-e5bf-4c70-ac4e-f34b32ebf746 --><\/p>\n<h2>Python\u3067\u306f\u300c\u95a2\u6570\u30c7\u30b3\u30ec\u30fc\u30bf\u300d\u3068\u3057\u3066\u5b9a\u7740<\/h2>\n<p>\u30c7\u30b3\u30ec\u30fc\u30bf\u3068\u3044\u3046\u8a00\u8449\u304c\u7279\u306b\u8eab\u8fd1\u306a\u306e\u304cPython\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-python\">@logging_decorator\n@cache_decorator\ndef get_data():\n    ...\n<\/code><\/pre>\n<p>\u3053\u306e\u69cb\u6587\u3067\u306f\u3001\u95a2\u6570\u3092\u5225\u306e\u95a2\u6570\u3067\u5305\u307f\u8fbc\u3080\u3053\u3068\u3067\u3001\u5143\u306e\u95a2\u6570\u3092\u5909\u66f4\u305b\u305a\u306b\u30ed\u30b0\u3084\u30ad\u30e3\u30c3\u30b7\u30e5\u306a\u3069\u306e\u51e6\u7406\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u91cd\u8981\u306a\u306e\u306f\u3001GoF\u306eDecorator\u3068Python\u306e<code>@decorator<\/code>\u304c\u5b8c\u5168\u306b\u540c\u3058\u5b9f\u88c5\u5f62\u5f0f\u3068\u3044\u3046\u308f\u3051\u3067\u306f\u306a\u3044\u70b9\u3067\u3059\u3002\u3057\u304b\u3057\u3001<strong>\u65e2\u5b58\u306e\u51e6\u7406\u3092\u30e9\u30c3\u30d7\u3057\u3066\u65b0\u3057\u3044\u632f\u308b\u821e\u3044\u3092\u5408\u6210\u3059\u308b<\/strong>\u3068\u3044\u3046\u4e2d\u5fc3\u7684\u306a\u8003\u3048\u65b9\u306f\u5171\u901a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u30d1\u30bf\u30fc\u30f3\u3092\u7406\u89e3\u3059\u308b\u3068\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3060\u3051\u3067\u306a\u304f\u9ad8\u968e\u95a2\u6570\u3084\u95a2\u6570\u5408\u6210\u3092\u7406\u89e3\u3059\u308b\u52a9\u3051\u306b\u3082\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: 962af87c-6c57-4967-95f6-a02f82ab9904 --><\/p>\n<p><!-- notionvc: e7c88724-74bb-4f67-8004-512b1c380b9e --><\/p>\n<h2>TypeScript\u30fbJava\u3067\u3082\u300c\u30e9\u30c3\u30d7\u3059\u308b\u8a2d\u8a08\u300d\u306f\u5065\u5728<\/h2>\n<p>TypeScript\u3067\u306f\u3001\u5171\u901a\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u6301\u3064\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5225\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u5305\u3080\u5f62\u3067Decorator\u3092\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002\u30c7\u30b3\u30ec\u30fc\u30bf\u3092\u4f55\u5c64\u3082\u91cd\u306d\u3001\u6700\u7d42\u7684\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u5229\u7528\u3067\u304d\u308b\u70b9\u304c\u7279\u5fb4\u3067\u3059\u3002<\/p>\n<p>Java\u3067\u3082\u3001\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306b\u5bfe\u3057\u3066\u8ffd\u52a0\u6a5f\u80fd\u3092\u6301\u3064Wrapper\u5b9f\u88c5\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002Oracle\u306eJava Tutorials\u3067\u3082\u3001\u3053\u3046\u3057\u305fWrapper\u3092Decorator\u30d1\u30bf\u30fc\u30f3\u306e\u4f8b\u3068\u3057\u3066\u8aac\u660e\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u306f\u53e4\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u8a2d\u8a08\u306e\u77e5\u8b58\u306b\u3068\u3069\u307e\u3089\u305a\u3001<strong>\u300c\u65e2\u5b58\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u7dad\u6301\u3057\u306a\u304c\u3089\u6a5f\u80fd\u3092\u5408\u6210\u3059\u308b\u300d\u3068\u3044\u3046\u666e\u904d\u7684\u306a\u8a2d\u8a08\u6280\u6cd5<\/strong>\u3068\u3057\u3066\u6349\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: bfe71f32-b291-472a-88d6-b3dd63a68ed6 --><\/p>\n<p><!-- notionvc: 6f8f5426-2511-4221-9b6f-0c100395eab3 --><\/p>\n<h2>\u30c7\u30b3\u30ec\u30fc\u30bf\u3068\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306f\u4f55\u304c\u9055\u3046\uff1f<\/h2>\n<p>Web\u958b\u767a\u3067\u306f\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u3068\u4f3c\u305f\u69cb\u9020\u3068\u3057\u3066\u300c\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u300d\u304c\u767b\u5834\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070API\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5bfe\u3057\u3066\u3001<\/p>\n<pre><code>Request\n \u2193\nLogging\n \u2193\nAuthentication\n \u2193\nRate Limit\n \u2193\nBusiness Logic\n \u2193\nResponse\n<\/code><\/pre>\n<p>\u3068\u3044\u3046\u51e6\u7406\u3092\u7d44\u307f\u7acb\u3066\u308b\u30b1\u30fc\u30b9\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u30c7\u30b3\u30ec\u30fc\u30bf\u3068\u975e\u5e38\u306b\u4f3c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u4e21\u8005\u3092\u5b8c\u5168\u306b\u540c\u4e00\u8996\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30c7\u30b3\u30ec\u30fc\u30bf\u306f\u4e3b\u306b<strong>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u8cac\u52d9\u3092\u62e1\u5f35\u3059\u308b\u8a2d\u8a08\u30d1\u30bf\u30fc\u30f3<\/strong>\u3067\u3042\u308a\u3001\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306fHTTP\u30ea\u30af\u30a8\u30b9\u30c8\u306a\u3069\u306e<strong>\u51e6\u7406\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3092\u69cb\u6210\u3059\u308b\u4ed5\u7d44\u307f<\/strong>\u3067\u3059\u3002<\/p>\n<p>\u4e00\u65b9\u3067\u3001\u5185\u90e8\u7684\u306a\u8a2d\u8a08\u601d\u60f3\u306b\u306f\u300c\u51e6\u7406\u3092\u30e9\u30c3\u30d7\u3057\u3066\u524d\u5f8c\u306b\u5225\u306e\u8cac\u52d9\u3092\u8ffd\u52a0\u3059\u308b\u300d\u3068\u3044\u3046\u5171\u901a\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u305f\u3081\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u306f\u3001Web API\u306e\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u8a2d\u8a08\u3092\u7406\u89e3\u3059\u308b\u3046\u3048\u3067\u3082\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: ad6987ea-c40e-44dd-aaf3-02ccde4af690 --><\/p>\n<p><!-- notionvc: 85fe66c1-67b1-4808-92ed-e752ea60da41 --><\/p>\n<h2>\u30c7\u30b3\u30ec\u30fc\u30bf\u306e\u30e1\u30ea\u30c3\u30c8<\/h2>\n<p>\u6700\u5927\u306e\u30e1\u30ea\u30c3\u30c8\u306f\u3001<strong>\u65e2\u5b58\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u305b\u305a\u306b\u6a5f\u80fd\u3092\u62e1\u5f35\u3057\u3084\u3059\u3044\u3053\u3068<\/strong>\u3067\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u901a\u77e5\u51e6\u7406\u306b\u300c\u30ed\u30b0\u300d\u300c\u30ea\u30c8\u30e9\u30a4\u300d\u300c\u6697\u53f7\u5316\u300d\u3092\u8ffd\u52a0\u3059\u308b\u3068\u3057\u3066\u3001\u305d\u308c\u305e\u308c\u3092\u72ec\u7acb\u3057\u305f\u30c7\u30b3\u30ec\u30fc\u30bf\u306b\u3059\u308c\u3070\u3001\u5fc5\u8981\u306a\u6a5f\u80fd\u3060\u3051\u3092\u7d44\u307f\u5408\u308f\u305b\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u4e00\u3064\u306e\u5de8\u5927\u306a\u30af\u30e9\u30b9\u306b\u3059\u3079\u3066\u306e\u6a5f\u80fd\u3092\u8a70\u3081\u8fbc\u307e\u305a\u3001\u305d\u308c\u305e\u308c\u306e\u8cac\u52d9\u3092\u5c0f\u3055\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u5206\u5272\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306f\u5358\u4e00\u8cac\u4efb\u306e\u8003\u3048\u65b9\u3068\u3082\u76f8\u6027\u304c\u3088\u304f\u3001\u65e2\u5b58\u30b3\u30fc\u30c9\u3078\u306e\u5909\u66f4\u3092\u6291\u3048\u306a\u304c\u3089\u62e1\u5f35\u3059\u308b\u8a2d\u8a08\u306b\u3064\u306a\u304c\u308a\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: 31105f53-b6bf-40e8-9ce3-e27754dc97f6 --><\/p>\n<p><!-- notionvc: f24b0a5d-5179-40d5-8b5b-566765af6c4f --><\/p>\n<h2>\u6ce8\u610f\u70b9\u306f\u300c\u91cd\u306d\u3059\u304e\u300d<\/h2>\n<p>\u4fbf\u5229\u306a\u4e00\u65b9\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u3092\u7121\u5236\u9650\u306b\u4f7f\u3048\u3070\u3088\u3044\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u6700\u3082\u6ce8\u610f\u3057\u305f\u3044\u306e\u304c<strong>\u591a\u5c64\u5316\u306b\u3088\u308b\u53ef\u8aad\u6027\u306e\u4f4e\u4e0b<\/strong>\u3067\u3059\u3002<\/p>\n<pre><code>A\n \u2514\u2500 B\n     \u2514\u2500 C\n         \u2514\u2500 D\n             \u2514\u2500 E\n<\/code><\/pre>\n<p>\u306e\u3088\u3046\u306b\u4f55\u5c64\u3082\u30e9\u30c3\u30d7\u3059\u308b\u3068\u3001\u300c\u5b9f\u969b\u306b\u3069\u306e\u51e6\u7406\u304c\u3069\u3053\u3067\u884c\u308f\u308c\u3066\u3044\u308b\u306e\u304b\u300d\u304c\u5206\u304b\u308a\u306b\u304f\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001\u9069\u7528\u9806\u5e8f\u306b\u3088\u3063\u3066\u7d50\u679c\u304c\u5909\u308f\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u300c\u30ad\u30e3\u30c3\u30b7\u30e5\u2192\u8a8d\u8a3c\u300d\u3068\u300c\u8a8d\u8a3c\u2192\u30ad\u30e3\u30c3\u30b7\u30e5\u300d\u3067\u306f\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3084\u30c7\u30fc\u30bf\u306e\u6271\u3044\u304c\u7570\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u5b9f\u52d9\u3067\u306f\u3001\u5358\u4f53\u30c6\u30b9\u30c8\u3060\u3051\u3067\u306a\u304f<strong>\u7d44\u307f\u5408\u308f\u305b\u3068\u9806\u5e8f\u3092\u610f\u8b58\u3057\u305f\u30c6\u30b9\u30c8<\/strong>\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n<p><!-- notionvc: 80a256ef-b305-40cc-b2e2-aeee29af6d17 --><\/p>\n<p><!-- notionvc: 9dc6c566-1e66-4bef-b3da-1b4aad210d26 --><\/p>\n<h2>Decorator\u30fbAdapter\u30fbProxy\u30fbStrategy\u306e\u9055\u3044<\/h2>\n<p>\u4f3c\u305f\u69cb\u9020\u3092\u6301\u3064\u30c7\u30b6\u30a4\u30f3\u30d1\u30bf\u30fc\u30f3\u3068\u306e\u9055\u3044\u3092\u7406\u89e3\u3059\u308b\u3068\u3001\u4f7f\u3044\u5206\u3051\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>Decorator<\/strong>\u306f\u3001\u57fa\u672c\u7684\u306b\u540c\u3058\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u7dad\u6301\u3057\u306a\u304c\u3089\u8cac\u52d9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><strong>Adapter<\/strong>\u306f\u3001\u7570\u306a\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306b\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p><strong>Proxy<\/strong>\u306f\u3001\u5bfe\u8c61\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u5236\u5fa1\u3059\u308b\u3053\u3068\u304c\u4e3b\u76ee\u7684\u3067\u3059\u3002<\/p>\n<p><strong>Strategy<\/strong>\u306f\u3001\u51e6\u7406\u305d\u306e\u3082\u306e\u3092\u5dee\u3057\u66ff\u3048\u308b\u305f\u3081\u306e\u8a2d\u8a08\u3067\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001\u300c\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u305f\u3044\u300d\u306e\u304b\u3001\u300c\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5909\u63db\u3057\u305f\u3044\u300d\u306e\u304b\u3001\u300c\u30a2\u30af\u30bb\u30b9\u3092\u5236\u5fa1\u3057\u305f\u3044\u300d\u306e\u304b\u3001\u300c\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u5207\u308a\u66ff\u3048\u305f\u3044\u300d\u306e\u304b\u3092\u8003\u3048\u308b\u3068\u3001\u9069\u5207\u306a\u30d1\u30bf\u30fc\u30f3\u3092\u9078\u3073\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: 3487ef91-a262-4915-aebf-a7ae172a5514 --><\/p>\n<p><!-- notionvc: 5f66f9b0-530f-4452-b67c-d8cc2e05c708 --><\/p>\n\n\n<h2 class=\"wp-block-heading\">\u73fe\u4ee3\u7684\u306a\u4f7f\u3044\u65b9\u306e\u30dd\u30a4\u30f3\u30c8<\/h2>\n\n\n\n<p>\u73fe\u5728\u306e\u958b\u767a\u3067\u30c7\u30b3\u30ec\u30fc\u30bf\u3092\u6d3b\u7528\u3059\u308b\u306a\u3089\u3001\u5358\u306b\u30d1\u30bf\u30fc\u30f3\u3092\u9069\u7528\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001<strong>\u4f55\u3092\u72ec\u7acb\u3057\u305f\u8cac\u52d9\u3068\u3057\u3066\u5207\u308a\u51fa\u3059\u306e\u304b<\/strong>\u3092\u5148\u306b\u8003\u3048\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30ed\u30b0\u3001\u8a8d\u8a3c\u3001\u76e3\u8996\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3001\u30ea\u30c8\u30e9\u30a4\u306a\u3069\u3001\u72ec\u7acb\u6027\u306e\u9ad8\u3044\u51e6\u7406\u306f\u30c7\u30b3\u30ec\u30fc\u30bf\u3068\u306e\u76f8\u6027\u304c\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\u4e00\u65b9\u3001\u8907\u96d1\u306a\u72b6\u614b\u7ba1\u7406\u3084\u51e6\u7406\u9806\u5e8f\u304c\u591a\u304f\u7d61\u3080\u5834\u5408\u306f\u3001\u7121\u7406\u306b\u30c7\u30b3\u30ec\u30fc\u30bf\u3078\u62bc\u3057\u8fbc\u307e\u305a\u3001Strategy\u3001Chain of Responsibility\u3001Middleware\u306a\u3069\u5225\u306e\u8a2d\u8a08\u3092\u691c\u8a0e\u3059\u308b\u307b\u3046\u304c\u5206\u304b\u308a\u3084\u3059\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081\uff1a\u30c7\u30b3\u30ec\u30fc\u30bf\u306e\u672c\u8cea\u306f\u300c\u5909\u66f4\u300d\u3067\u306f\u306a\u304f\u300c\u5408\u6210\u300d<\/h2>\n\n\n\n<p>\u30c7\u30b3\u30ec\u30fc\u30bf\u30d1\u30bf\u30fc\u30f3\u306e\u672c\u8cea\u306f\u3001\u5358\u7d14\u306b\u6a5f\u80fd\u3092\u300c\u4ed8\u3051\u8db3\u3059\u300d\u3053\u3068\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p><strong>\u65e2\u5b58\u306e\u51e6\u7406\u3092\u5909\u66f4\u305b\u305a\u3001\u8907\u6570\u306e\u8cac\u52d9\u3092\u5c0f\u3055\u306a\u5358\u4f4d\u306b\u5206\u96e2\u3057\u3001\u305d\u308c\u3089\u3092\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068<\/strong>\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u601d\u60f3\u306f\u3001GoF\u306eDecorator\u3060\u3051\u3067\u306a\u304f\u3001Python\u306e\u95a2\u6570\u30c7\u30b3\u30ec\u30fc\u30bf\u3001TypeScript\u306eWrapper\u3001Java\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3Wrapper\u3001Web API\u306e\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306a\u3069\u3001\u73fe\u4ee3\u306e\u3055\u307e\u3056\u307e\u306a\u958b\u767a\u30b9\u30bf\u30a4\u30eb\u306b\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u91cd\u8981\u306a\u306e\u306f\u300cDecorator\u3092\u4f7f\u3046\u3053\u3068\u300d\u3067\u306f\u306a\u304f\u3001<strong>\u7d99\u627f\u306b\u3088\u308b\u56fa\u5b9a\u7684\u306a\u62e1\u5f35\u3068\u3001\u5408\u6210\u306b\u3088\u308b\u67d4\u8edf\u306a\u62e1\u5f35\u3092\u4f7f\u3044\u5206\u3051\u308b\u3053\u3068<\/strong>\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u6a5f\u80fd\u8ffd\u52a0\u306e\u53ef\u80fd\u6027\u304c\u591a\u304f\u3001\u7d44\u307f\u5408\u308f\u305b\u3092\u67d4\u8edf\u306b\u5909\u3048\u305f\u3044\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u3068\u3044\u3046\u8003\u3048\u65b9\u304c\u4eca\u5f8c\u3082\u6709\u529b\u306a\u8a2d\u8a08\u624b\u6bb5\u306e\u4e00\u3064\u3067\u3042\u308a\u7d9a\u3051\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>\u30c7\u30b3\u30ec\u30fc\u30bf\u30d1\u30bf\u30fc\u30f3\u306e\u57fa\u672c\u304b\u3089\u3001\u7d99\u627f\u3068\u306e\u9055\u3044\u3001Python\u30fbTypeScript\u30fbJava\u306a\u3069\u3067\u306e\u5b9f\u8df5\u3001API\u3084\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3078\u306e\u5fdc\u7528\u3001\u8a2d\u8a08\u4e0a\u306e\u6ce8\u610f\u70b9\u307e\u3067\u3092\u89e3\u8aac\u3002\u73fe\u4ee3\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u958b\u767a\u3067\u30c7\u30b3\u30ec\u30fc\u30bf\u304c\u679c\u305f\u3059\u5f79\u5272\u3092\u3001\u5358\u306a\u308b\u300c\u6a5f\u80fd [&hellip;]<\/p>\n","protected":false},"author":22,"featured_media":7109,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","swell_btn_cv_data":"","footnotes":"","_wp_rev_ctl_limit":""},"categories":[1249],"tags":[1117,1118,1119],"class_list":["post-7112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledge","tag-decorator","tag-middleware","tag-1119"],"_links":{"self":[{"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/posts\/7112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/comments?post=7112"}],"version-history":[{"count":2,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/posts\/7112\/revisions"}],"predecessor-version":[{"id":9792,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/posts\/7112\/revisions\/9792"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/media\/7109"}],"wp:attachment":[{"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/media?parent=7112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/categories?post=7112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/tags?post=7112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}