{"id":6298,"date":"2022-12-16T09:19:59","date_gmt":"2022-12-16T01:19:59","guid":{"rendered":"http:\/\/1989lifejourney.com\/2022\/12\/16\/%e5%ad%b8%e5%88%b0%e7%9a%84design-pattern%e6%95%b4%e7%90%86\/"},"modified":"2022-12-16T09:24:32","modified_gmt":"2022-12-16T01:24:32","slug":"%e5%ad%b8%e5%88%b0%e7%9a%84design-pattern%e6%95%b4%e7%90%86","status":"publish","type":"post","link":"https:\/\/1989lifejourney.com\/?p=6298","title":{"rendered":"\u5b78\u5230\u7684design pattern\u6574\u7406"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Creational patterns:<\/h2>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Abstract_factory_pattern\">Abstract factory<\/a><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Dependency_injection\">Dependency Injection<\/a><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Factory_method_pattern\">Factory method<\/a><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Lazy_initialization\">Lazy initialization<\/a><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Singleton_pattern\">Singleton<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Structural patterns:<\/h2>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Adapter_pattern\">Adapter<\/a>, Wrapper, or Translator<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Behavioral patterns:<\/h2>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Command_pattern\">Command<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Concurrency patterns:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ref: <\/h2>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Software_design_pattern\">https:\/\/en.wikipedia.org\/wiki\/Software_design_pattern<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creational patterns: Abstract factory Dependency Inject [&hellip;]<\/p>\n","protected":false},"author":139426785,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_postgate_lock_override":"inherit","_postgate_lock_mode":"inherit","_postgate_preview_mode":"inherit","_postgate_preview_limit":0,"_postgate_product_ids":[],"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","jetpack_seo_llms_txt_always_include":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[36769,11176,1],"tags":[],"post_folder":[],"class_list":["post-6298","post","type-post","status-publish","format-standard","hentry","category-design-pattern","category-software-engineering","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paR5vw-1DA","jetpack-related-posts":[{"id":5771,"url":"https:\/\/1989lifejourney.com\/?p=5771","url_meta":{"origin":6298,"position":0},"title":"Design pattern\u5b78\u7fd2 &#8211; 4 (Simple Factory\u7c21\u55ae\u5de5\u5ee0\u6a21\u5f0f)","author":"Kevin","date":"31 7 \u6708, 2022","format":false,"excerpt":"\u76ee\u7684: \u5b9a\u7fa9\u4e00\u500b\u7c21\u55ae\u5de5\u5ee0\uff0c\u50b3\u5165\u4e0d\u540c\u7684\u53c3\u6578\u53d6\u5f97\u4e0d\u540c\u7684\u985e\u5225\u7269\u4ef6\u3002 \u5099\u8a3b: Simple Factory\u5176\u2026","rel":"","context":"\u5728\u300cDesign Pattern\u300d\u4e2d","block_context":{"text":"Design Pattern","link":"https:\/\/1989lifejourney.com\/?cat=36769"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5776,"url":"https:\/\/1989lifejourney.com\/?p=5776","url_meta":{"origin":6298,"position":1},"title":"Design pattern\u5b78\u7fd2 &#8211; 5 (Factory\u5de5\u5ee0\u6a21\u5f0f)","author":"Kevin","date":"31 7 \u6708, 2022","format":false,"excerpt":"\u76ee\u7684: \u63d0\u4f9b\u4e00\u500b\u5de5\u5ee0\u4ecb\u9762\uff0c\u5c07\u7522\u751f\u5be6\u9ad4\u7684\u7a0b\u5f0f\u78bc\u4ea4\u7531\u5b50\u985e\u5225\u5404\u81ea\u5be6\u73fe\u3002 \u5099\u8a3b: \u7c21\u55ae\u5de5\u5ee0\u6a21\u5f0f\u548c\u5de5\u5ee0\u6a21\u5f0f\u6bd4\u8f03\u2026","rel":"","context":"\u5728\u300cDesign Pattern\u300d\u4e2d","block_context":{"text":"Design Pattern","link":"https:\/\/1989lifejourney.com\/?cat=36769"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5727,"url":"https:\/\/1989lifejourney.com\/?p=5727","url_meta":{"origin":6298,"position":2},"title":"Design Pattern\u5b78\u7fd2 &#8211; 1","author":"Kevin","date":"10 7 \u6708, 2022","format":false,"excerpt":"\u4ee5\u4e0b\u8cc7\u6599\u4f86\u6e90\u5927\u90e8\u5206\u90fd\u662f\u5f9e\u4e0b\u9762\u9019\u500b\u7db2\u7ad9\u800c\u4f86\uff0c\u9019\u88e1\u50c5\u4f5c\u500b\u4eba\u7b46\u8a18\u6574\u7406:\u53c3\u8003\u7db2\u7ad9: https:\/\/skyy\u2026","rel":"","context":"\u5728\u300cDesign Pattern\u300d\u4e2d","block_context":{"text":"Design Pattern","link":"https:\/\/1989lifejourney.com\/?cat=36769"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7125,"url":"https:\/\/1989lifejourney.com\/?p=7125","url_meta":{"origin":6298,"position":3},"title":"Design pattern &#8211; Observer pattern","author":"Kevin","date":"5 3 \u6708, 2023","format":false,"excerpt":"\u54ea\u7a2eDesign pattern(Creational\/Structural\/Behavioural\u2026","rel":"","context":"\u5728\u300cDesign Pattern\u300d\u4e2d","block_context":{"text":"Design Pattern","link":"https:\/\/1989lifejourney.com\/?cat=36769"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5750,"url":"https:\/\/1989lifejourney.com\/?p=5750","url_meta":{"origin":6298,"position":4},"title":"Design pattern\u5b78\u7fd2 &#8211; 3 (Singleton\u55ae\u4f8b\u6a21\u5f0f)","author":"Kevin","date":"31 7 \u6708, 2022","format":false,"excerpt":"\u76ee\u7684: \u4fdd\u8b49\u4e00\u500b\u985e\u5225\u53ea\u6703\u7522\u751f\u4e00\u500b\u7269\u4ef6\uff0c\u800c\u4e14\u8981\u63d0\u4f9b\u5b58\u53d6\u8a72\u7269\u4ef6\u7684\u7d71\u4e00\u65b9\u6cd5 \u9808\u8003\u616e\u7684\u60c5\u5883: lazy in\u2026","rel":"","context":"\u5728\u300cDesign Pattern\u300d\u4e2d","block_context":{"text":"Design Pattern","link":"https:\/\/1989lifejourney.com\/?cat=36769"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6486,"url":"https:\/\/1989lifejourney.com\/?p=6486","url_meta":{"origin":6298,"position":5},"title":"Software engineering &#8211; Describe View, ViewModel, DataService, BluetoothService relationships by interaction diagram, class diagram","author":"Kevin","date":"16 1 \u6708, 2023","format":false,"excerpt":"Prerequisite: Interaction diagram\u63cf\u8ff0object\u4e4b\u9593\u7684\u4e92\u52d5 Cla\u2026","rel":"","context":"\u5728\u300cDesign Pattern\u300d\u4e2d","block_context":{"text":"Design Pattern","link":"https:\/\/1989lifejourney.com\/?cat=36769"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/1989lifejourney.com\/wp-content\/uploads\/2023\/01\/uml_classes_en.svg_.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/1989lifejourney.com\/wp-content\/uploads\/2023\/01\/uml_classes_en.svg_.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/1989lifejourney.com\/wp-content\/uploads\/2023\/01\/uml_classes_en.svg_.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts\/6298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/users\/139426785"}],"replies":[{"embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6298"}],"version-history":[{"count":5,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts\/6298\/revisions"}],"predecessor-version":[{"id":6304,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts\/6298\/revisions\/6304"}],"wp:attachment":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6298"},{"taxonomy":"post_folder","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fpost_folder&post=6298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}