{"id":221,"date":"2018-04-10T11:28:13","date_gmt":"2018-04-10T11:28:13","guid":{"rendered":"https:\/\/nurlandroid.com\/?p=221"},"modified":"2021-04-01T07:59:26","modified_gmt":"2021-04-01T07:59:26","slug":"design-patterns-used-in-android","status":"publish","type":"post","link":"https:\/\/nurlandroid.com\/?p=221","title":{"rendered":"Design patterns used in Android"},"content":{"rendered":"<p>\u041f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u0432 Android \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435(SDK, \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438). \u041d\u043e, \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u0435\u043c.<\/p>\n<p><!--more--><\/p>\n<p><span style=\"color: #000000;\"><em>Creational<\/em><\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">Builder<\/span><\/li>\n<li><span style=\"color: #000000;\">Dependency Injection<\/span><\/li>\n<li><span style=\"color: #000000;\">Singleton<\/span><\/li>\n<li><span style=\"color: #000000;\">Factory<\/span><\/li>\n<li><span style=\"color: #000000;\">Factory method<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><em>Structural<\/em><\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">Adapter<\/span><\/li>\n<li><span style=\"color: #000000;\">Facade<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><em>Behavioral<\/em><\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">Command<\/span><\/li>\n<li><span style=\"color: #000000;\">Observer<\/span><\/li>\n<li><span style=\"color: #000000;\">Model View Presenter<\/span><\/li>\n<li><span style=\"color: #000000;\">Model View Controller<\/span><\/li>\n<li><span style=\"color: #000000;\">Model View ViewModel<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">1) <strong>View Holder<\/strong>\u00a0uses <strong>Singleton<\/strong> DP<\/span><\/p>\n<p><span style=\"color: #000000;\">2) <strong>Intent<\/strong> uses <strong>Factory<\/strong> DP<\/span><\/p>\n<p><span style=\"color: #000000;\">3) <strong>Adapter<\/strong> uses <strong>Adapter<\/strong> DP<\/span><\/p>\n<p><span style=\"color: #000000;\">4) <strong>OnClickListener,<\/strong>\u00a0<strong>Broadcast Receiver, RxJava<\/strong> uses <strong>Observer<\/strong> DP<\/span><\/p>\n<p><span style=\"color: #000000;\">5) <strong>View<\/strong> uses <strong>Composite<\/strong> DP<\/span><\/p>\n<p><span style=\"color: #000000;\">6) <strong>Media FrameWork, Retrofit<\/strong> uses <strong>Facade<\/strong> DP<\/span><\/p>\n<p><span style=\"color: #000000;\">7) <strong>Dagger<\/strong> uses <strong>Dependency Injection <\/strong>DP<\/span><\/p>\n<p><span style=\"color: #000000;\">8) <strong>AlertDialog<\/strong> uses <strong>Builder<\/strong> DP<\/span><\/p>\n<p><span style=\"color: #000000;\">9) <strong>EventBus<\/strong> uses <strong>Command<\/strong> DP<\/span><\/p>\n<p>10)\u00a0<span style=\"color: #000000;\"><strong>new Fragment<\/strong>\u00a0uses <strong>Fabric Method<\/strong> DP<\/span><\/p>\n<p>https:\/\/www.raywenderlich.com\/109843\/common-design-patterns-for-android<\/p>\n<p>https:\/\/refactoring.guru\/ru\/design-patterns\/catalog<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u0432 Android \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435(SDK, \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438). \u041d\u043e, \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u0435\u043c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,18],"tags":[],"class_list":["post-221","post","type-post","status-publish","format-standard","hentry","category-android","category-design-patterns"],"_links":{"self":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=221"}],"version-history":[{"count":3,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":267,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions\/267"}],"wp:attachment":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}