JavaGuide/docs/system-design/basis/pictures/common-design-patterns.drawio

107 lines
14 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<mxfile host="Electron" modified="2023-12-28T06:29:51.429Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.1.2 Chrome/114.0.5735.289 Electron/25.9.4 Safari/537.36" etag="YB3RqJiO1qUQqNEB_P1B" version="22.1.2" type="device">
<diagram id="5TbergEmUlRJiKQ31r4Q" name="Page-1">
<mxGraphModel dx="1980" dy="664" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" background="#F6FFF8" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="-E_oDqw7yWDpvZF3vQNq-1" value="" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=1;shadow=0;sketch=0;fillColor=#F6FFF8;fontFamily=JetBrains Mono;strokeColor=default;dashed=1;fontSize=16;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="-110" y="280" width="950" height="510" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-37" value="" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=1;fillColor=#dae8fc;strokeColor=none;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSize=16;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="320" y="340" width="420" height="190" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-35" value="" style="group;strokeWidth=1;rounded=0;glass=0;shadow=0;sketch=0;fontFamily=JetBrains Mono;strokeColor=none;fontSize=16;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1" connectable="0">
<mxGeometry x="320" y="335" width="381" height="200" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-36" value="" style="group;shadow=0;sketch=0;fontFamily=JetBrains Mono;strokeColor=none;fontSize=16;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="-E_oDqw7yWDpvZF3vQNq-35" vertex="1" connectable="0">
<mxGeometry width="381" height="200" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-38" value="&lt;font style=&quot;font-size: 16px;&quot;&gt;结构型&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="-E_oDqw7yWDpvZF3vQNq-36" vertex="1">
<mxGeometry x="170" y="15" width="90" height="20" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-39" value="代理" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;fillColor=#fff2cc;strokeColor=none;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="-E_oDqw7yWDpvZF3vQNq-36" vertex="1">
<mxGeometry x="20" y="60" width="90" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-40" value="桥接" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;shadow=0;sketch=0;fontFamily=JetBrains Mono;strokeColor=none;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="-E_oDqw7yWDpvZF3vQNq-36" vertex="1">
<mxGeometry x="120" y="60" width="90" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-41" value="适配器" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;fillColor=#fff2cc;strokeColor=none;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="-E_oDqw7yWDpvZF3vQNq-36" vertex="1">
<mxGeometry x="20" y="130" width="90" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-42" value="装饰器" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;shadow=0;sketch=0;fontFamily=JetBrains Mono;strokeColor=none;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="-E_oDqw7yWDpvZF3vQNq-36" vertex="1">
<mxGeometry x="120" y="130" width="90" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-43" value="门面" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;shadow=0;sketch=0;fontFamily=JetBrains Mono;strokeColor=none;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="-E_oDqw7yWDpvZF3vQNq-36" vertex="1">
<mxGeometry x="220" y="60" width="90" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-44" value="组合" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;fillColor=#fff2cc;strokeColor=none;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="-E_oDqw7yWDpvZF3vQNq-36" vertex="1">
<mxGeometry x="220" y="130" width="90" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-64" value="享元" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;shadow=0;sketch=0;fontFamily=JetBrains Mono;strokeColor=none;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="640" y="420" width="90" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-98" value="" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=1;fillColor=#f8cecc;strokeColor=none;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSize=16;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="-50" y="340" width="320" height="190" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-99" value="创建型" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="65" y="360" width="90" height="20" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-100" value="单例" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;fillColor=#fff2cc;strokeColor=none;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="-14" y="395" width="90" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-101" value="工厂" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;fillColor=#fff2cc;strokeColor=none;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="120" y="395" width="90" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-102" value="建造者" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;fillColor=#fff2cc;strokeColor=none;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="-14" y="465" width="90" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-103" value="原型" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;shadow=0;sketch=0;fontFamily=JetBrains Mono;strokeColor=none;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="120" y="465" width="90" height="50" as="geometry" />
</mxCell>
<mxCell id="mj_SiyJ7ypP92xip4_Ex-2" value="&lt;strong style=&quot;box-sizing: border-box; caret-color: rgb(59, 69, 78); color: rgb(59, 69, 78); font-size: 22px; orphans: 4; text-align: start;&quot;&gt;常见的设计模式&lt;/strong&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=22;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="262" y="290" width="206" height="30" as="geometry" />
</mxCell>
<mxCell id="5TUbFG3hkI_PGsOjX6wt-1" value="公众号JavaGuide&lt;br style=&quot;font-size: 16px;&quot;&gt;网站javaguide.cn" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;labelBackgroundColor=none;fontSize=16;fontColor=#B3B3B3;rotation=0;sketch=1;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="670" y="590" width="185" height="70" as="geometry" />
</mxCell>
<mxCell id="cIwtx1gA6A6vilb051IR-2" value="" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=1;fillColor=#d5e8d4;strokeColor=none;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSize=16;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" vertex="1" parent="1">
<mxGeometry x="-50" y="560" width="730" height="180" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-73" value="模板" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;fillColor=#fff2cc;strokeColor=none;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="-10.002535211267599" y="590" width="88.09859154929578" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-74" value="观察者" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;fillColor=#fff2cc;strokeColor=none;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="107.46225352112674" y="590" width="88.09859154929578" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-75" value="责任链" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;fillColor=#fff2cc;strokeColor=none;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="215.13830985915496" y="590" width="88.09859154929578" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-76" value="策略" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;fillColor=#fff2cc;strokeColor=none;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="331.71232394366206" y="590" width="88.09859154929578" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-77" value="命令" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;fillColor=#fff2cc;strokeColor=none;shadow=0;sketch=0;fontFamily=JetBrains Mono;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="437.34253521126766" y="590" width="88.09859154929578" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-97" value="中介者" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;shadow=0;sketch=0;fontFamily=JetBrains Mono;strokeColor=none;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="547.9552112676056" y="620" width="88.09859154929578" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-78" value="迭代器" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;shadow=0;sketch=0;fontFamily=JetBrains Mono;strokeColor=none;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="-10.002535211267599" y="660" width="88.09859154929578" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-79" value="访问者" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;shadow=0;sketch=0;fontFamily=JetBrains Mono;strokeColor=none;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="107.46225352112674" y="660" width="88.09859154929578" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-80" value="备忘录" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;shadow=0;sketch=0;fontFamily=JetBrains Mono;strokeColor=none;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="215.13830985915496" y="660" width="88.09859154929578" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-93" value="解释器" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;shadow=0;sketch=0;fontFamily=JetBrains Mono;strokeColor=none;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="332.6030985915493" y="660" width="88.09859154929578" height="50" as="geometry" />
</mxCell>
<mxCell id="-E_oDqw7yWDpvZF3vQNq-94" value="状态" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=1;fontSize=16;shadow=0;sketch=0;fontFamily=JetBrains Mono;strokeColor=none;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DJetBrains%2BMono;" parent="1" vertex="1">
<mxGeometry x="437.34253521126766" y="660" width="88.09859154929578" height="50" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>