{"id":322,"date":"2016-11-21T01:17:55","date_gmt":"2016-11-20T23:17:55","guid":{"rendered":"http:\/\/ahmadmagdy.me\/blog\/?p=322"},"modified":"2017-01-15T15:26:35","modified_gmt":"2017-01-15T13:26:35","slug":"%d9%85%d8%a8%d8%a7%d8%af%d8%a6-%d8%aa%d8%b5%d9%85%d9%8a%d9%85-%d8%a7%d9%84%d8%a8%d8%b1%d9%85%d8%ac%d9%8a%d8%a7%d8%aa-%d9%83%d8%a7%d8%a6%d9%86%d9%8a%d8%a9-%d8%a7%d9%84%d8%aa%d9%88%d8%ac%d9%8a%d9%87-ood","status":"publish","type":"post","link":"https:\/\/magdy.dk\/arblog\/?p=322","title":{"rendered":"\u0645\u0628\u0627\u062f\u0626 \u062a\u0635\u0645\u064a\u0645 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0627\u062a \u0643\u0627\u0626\u0646\u064a\u0629 \u0627\u0644\u062a\u0648\u062c\u064a\u0647 OOD"},"content":{"rendered":"<p><span style=\"font-size: 14pt;\">\u0627\u0644\u0633\u0644\u0627\u0645 \u0639\u0644\u064a\u0643\u0645<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u064a\u0648\u062c\u062f \u0639\u062f\u0629 \u0645\u0628\u0627\u062f\u0626 \u0644\u062a\u0635\u0645\u064a\u0645 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0627\u062a \u0628\u0627\u0644\u0637\u0631\u064a\u0642\u0629 \u0643\u0627\u0626\u0646\u064a\u0629 \u0627\u0644\u062a\u0648\u062c\u064a\u0647 <em>Object Oriented Desing\u00a0<\/em>\u0647\u0630\u0647 \u0627\u0644\u0645\u0628\u0627\u062f\u0626 \u062a\u062c\u0639\u0644 \u0645\u0646 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0627\u062a \u0627\u0644\u062a\u064a \u0646\u0642\u0648\u0645 \u0628\u0643\u062a\u0627\u0628\u062a\u0647\u0627 \u0648\u0627\u0636\u062d\u0629 \u0627\u0643\u062b\u0631 \u0641\u064a \u0637\u0631\u064a\u0642\u0629 \u0639\u0645\u0644\u0647\u0627 \u0648\u0633\u0647\u0644\u064c \u0635\u064a\u0627\u0646\u062a\u0647\u0627 \u0648\u062a\u0637\u0648\u064a\u0631\u0647\u0627 \u0628\u062f\u0648\u0646 \u0625\u0644\u062d\u0627\u0642 \u0627\u064a \u062a\u063a\u064a\u064a\u0631 \u0627\u0648 \u0636\u0631\u0631 \u0641\u064a \u0627\u0633\u0627\u0633 \u0628\u0631\u0627\u0645\u062c\u0643.<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u0627\u0648\u0644 \u062e\u0645\u0633 \u0645\u0628\u0627\u062f\u0626 \u0645\u062c\u0645\u0648\u0639\u0629 \u0641\u064a \u0643\u0644\u0645\u0629 SOLID Principles \u0648\u0642\u062f \u0642\u0627\u0645 \u0628\u0628\u062f\u0621 \u0647\u0630\u0647 \u0627\u0644\u0645\u0628\u0627\u062f\u0626\u00a0Robert Cecil Martin \u0627\u0644\u0645\u0639\u0631\u0648\u0641 \u0628\u0627\u0633\u0645\u00a0<strong>Uncle Bob.<\/strong><\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u0643\u0644 \u062d\u0631\u0641 \u0645\u0646 \u0643\u0644\u0645\u0629 SOLID \u0627\u062e\u062a\u0635\u0627\u0631 \u0644\u0645\u0628\u062f\u0621 \u0645\u0646 \u0627\u0644\u0645\u0628\u0627\u062f\u0626<\/span><\/p>\n<p style=\"text-align: left;\"><span style=\"font-size: 14pt;\">\u00a0 \u00a0S: Single Responsibility Principle<\/span><\/p>\n<p style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0645\u0628\u062f\u0623 \u0627\u0644\u0645\u0633\u0624\u0648\u0644\u064a\u0629 \u0627\u0644\u0648\u062d\u064a\u062f\u0629<\/span><\/p>\n<p style=\"text-align: left;\"><span style=\"font-size: 14pt;\">O: Open-Closed Principle<\/span><\/p>\n<p style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0645\u0628\u062f\u0623 \u0627\u0644\u0641\u062a\u062d \u0648\u0627\u0644\u0627\u063a\u0644\u0627\u0642<\/span><\/p>\n<p style=\"text-align: left;\"><span style=\"font-size: 14pt;\">L : Liskov Substitution Principle<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u0645\u0628\u062f\u0623 \u0625\u062d\u0644\u0627\u0644 \u0644\u064a\u0633\u0643\u0648\u0641<\/span><\/p>\n<p style=\"text-align: left;\"><span style=\"font-size: 14pt;\">I : Interface Segregation Principle<\/span><\/p>\n<p style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0645\u0628\u062f\u0623 \u0641\u0635\u0644 \u0627\u0644\u0648\u0627\u062c\u0647\u0647<\/span><\/p>\n<p style=\"text-align: left;\"><span style=\"font-size: 14pt;\">D:\u00a0Dependency Inversion Principle<\/span><\/p>\n<p style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0645\u0628\u062f\u0623 \u0639\u0643\u0633 \u0627\u0644\u062a\u0628\u0639\u064a\u0629<\/span><\/p>\n<hr \/>\n<p dir=\"ltr\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\"><strong>&#8211;\u00a0Single Responsibility Principle (SRP)<\/strong><\/span><\/p>\n<blockquote>\n<p dir=\"ltr\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">A class should have only one reason to change.<\/span><\/p>\n<\/blockquote>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0627\u0644\u0640 Class \u064a\u062c\u0628 \u0627\u0646 \u064a\u0643\u0648\u0646 \u0644\u0647 \u0633\u0628\u0628 \u0648\u0627\u062d\u062f \u0644\u064a\u062a\u063a\u064a\u0631.<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0645\u0627\u0646\u0641\u0647\u0645\u0647 \u0627\u0646 \u00a0\u064a\u0643\u0648\u0646 \u0644\u0644\u0628\u0631\u0646\u0627\u0645\u062c \u0627\u0644\u062e\u0627\u0635 \u0628\u0646\u0627 Classes \u0644\u0644\u0642\u064a\u0627\u0645 \u0628\u0627\u0644\u0648\u0638\u0627\u0626\u0641 \u0648 \u0643\u0644 Class \u062c\u0632\u0621 \u0645\u0646 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c \u0644\u0647 \u0648\u0638\u064a\u0641\u0629 \u0645\u0639\u064a\u0646\u0629 \u0645\u062a\u0639\u0644\u0642\u0629 \u0628\u0628\u0639\u0636\u0647\u0627 \u0627\u0648 \u0644\u0647\u0627 \u0646\u0641\u0633 \u0627\u0644\u063a\u0631\u0636 \u0648\u0642\u062f \u062a\u0643\u0648\u0646 \u0645\u0639\u062a\u0645\u062f\u0629 \u0639\u0644\u0649 \u0628\u0639\u0636\u0647\u0627 \u00a0, \u0641\u0627\u064a \u062a\u0639\u062f\u064a\u0644 \u0641\u064a \u062c\u0632\u0621 \u0645\u0646\u0647 \u0642\u062f \u064a\u0624\u062b\u0631 \u0639\u0644\u0649 \u062c\u0632\u0621 \u0627\u062e\u0631.<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0627\u064a \u064a\u0645\u0643\u0646\u0646\u0627 \u0627\u0644\u0642\u0648\u0644 \u0627\u0646 \u0644\u0643\u0644 Class \u0645\u0633\u0624\u0648\u0644\u064a\u0629 \u0645\u0639\u064a\u0646\u0629 \u064a\u0642\u0648\u0645 \u0628\u0647\u0627 \u0644\u0627 \u064a\u0645\u0643\u0646\u0647\u0627 \u0627\u0646 \u062a\u062a\u0641\u0631\u0639 \u0644\u0627\u062c\u0632\u0627\u0621 \u0627\u062e\u0631\u0649 \u0644\u0627 \u0639\u0644\u0627\u0642\u0629 \u0644\u0647\u0627 \u0628\u0647\u0627.<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0643\u0645\u062b\u0627\u0644 \u0628\u0633\u064a\u0637 \u0644\u0648 \u0627\u0646 \u0644\u062f\u064a\u0646\u0627 class \u064a\u062f\u0639\u0649 StudentOperations \u0644\u0627\u0628\u062f \u0627\u0646 \u064a\u062d\u062a\u0648\u064a \u0639\u0644\u0649 \u0639\u0645\u0644\u064a\u0627\u062a \u062a\u062a\u0639\u0644\u0642 \u0628\u0627\u0644 Student \u0645\u062b\u0644 \u0627\u0644\u0627\u0636\u0627\u0641\u0629 Add \u00a0\u0627\u0648 \u0627\u0644\u062d\u0630\u0641 Remove \u0648\u0627\u0644\u0639\u0645\u0644\u064a\u0627\u062a \u0627\u0644\u0645\u062a\u0639\u0644\u0642\u0629\u00a0<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0644\u064a\u0633 \u0645\u0646 \u0627\u0644\u0645\u0646\u0637\u0642\u064a \u0627\u0646 \u0627\u0636\u064a\u0641 \u0641\u064a \u0627\u0644 Class \u062f\u0627\u0644\u0629 \u062a\u062d\u0633\u0628 \u0645\u062d\u064a\u0637 \u0627\u0644\u062f\u0627\u0626\u0631\u0629 \u0627\u0648 \u0627\u0644\u0631\u0627\u062a\u0628 \u0627\u0644\u0627\u062c\u0645\u0627\u0644\u064a \u0644\u0644\u0645\u0648\u0638\u0641 , \u0643\u0644\u0647\u0627 \u0627\u0634\u064a\u0627\u0621 \u0644\u064a\u0633\u062a \u0645\u062a\u0639\u0644\u0642\u0629 \u0628\u0647 \u0648\u062a\u0646\u0627\u0641\u064a \u0645\u0628\u062f\u0623 SRP<\/span><\/p>\n<p dir=\"ltr\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\"><strong>&#8211; Open-Closed Principle\u00a0(<b>OCP<\/b>)<\/strong><\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u064a\u0639\u0646\u064a \u0627\u0646 \u0627\u0644\u0640class \u0627\u0648 \u0627\u0644\u0640methods \u0628\u062f\u0627\u062e\u0644\u0647 \u064a\u062c\u0628 \u0627\u0646 \u062a\u0643\u0648\u0646 \u0645\u063a\u0644\u0642\u0629 \u0644\u0644\u062a\u0639\u062f\u064a\u0644 \u0645\u0641\u062a\u0648\u062d\u0629 \u0644\u0644\u062a\u0648\u0633\u0639\u00a0<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0628\u0645\u0639\u0646\u0649 \u0627\u062e\u0631 \u064a\u062c\u0628 \u0627\u0646 \u062a\u0643\u0648\u0646 \u0627\u0644\u0645\u062d\u062a\u0648\u064a\u0627\u062a \u0645\u0641\u062a\u0648\u062d\u0629 \u0644\u0644\u062a\u0648\u0633\u0639\u0629 \u0648\u0627\u0636\u0627\u0641\u0629 \u0627\u062c\u0632\u0627\u0621 \u062c\u062f\u064a\u062f\u0629 \u0628\u0634\u0631\u0637 \u0639\u062f\u0645 \u0627\u0644\u0645\u0633\u0627\u0633 \u0628\u0627\u0644\u062c\u0632\u0621 \u0627\u0644\u0627\u0633\u0627\u0633 , \u0628\u062d\u064a\u062b \u0627\u0646\u0647 \u0644\u0648 \u0627\u0633\u062a\u062e\u062f\u0645\u0646\u0627 \u0647\u0630\u0647 \u0627\u0644Methods \u0633\u0627\u0628\u0642\u0627 \u0644\u0646 \u062a\u0624\u062b\u0631 \u0639\u0644\u0649 \u0637\u0631\u064a\u0642\u0629 \u0639\u0645\u0644\u0647\u0627 \u0627\u0648 \u0639\u0644\u0649 \u0643\u064a\u0641\u064a\u0629 \u0627\u0633\u062a\u062e\u062f\u0627\u0645\u0646\u0627 \u0644\u0647\u0627.<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0633\u064a\u0641\u064a\u062f\u0646\u0627 \u0647\u0630\u0647 \u0641\u064a \u0627\u0646\u0647 \u0639\u0646\u062f\u0645\u0627 \u0646\u0634\u0631\u0639 \u0641\u064a \u0643\u062a\u0627\u0628\u0629 \u0627\u0643\u0648\u0627\u062f \u0628\u0631\u0645\u062c\u0629 \u0646\u0636\u0639 \u0641\u064a \u0627\u0639\u062a\u0628\u0627\u0631\u0646\u0627 \u0627\u0646 \u062a\u0643\u0648\u0646 \u0647\u0630\u0647 \u0645\u0631\u0646\u0629 \u0648\u0642\u0627\u0628\u0644\u0629 \u0644\u0644\u062a\u0648\u0633\u0639 \u0645\u0633\u062a\u0642\u0628\u0644\u0627\u064b \u0648\u0644\u064a\u0633\u062a \u0645\u062c\u0631\u062f \u062d\u0627\u0644\u0627\u062a \u0627\u0648 \u0627\u0634\u064a\u0627\u0621 \u062c\u0627\u0645\u062f\u0629\u00a0<\/span><\/p>\n<p dir=\"ltr\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\"><strong>&#8211; Liskov Substitution Principle\u00a0(<b>LSP<\/b>)<\/strong><\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0644\u0627 \u062a\u062f\u0639 \u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u063a\u0631\u064a\u0628 \u064a\u0632\u0639\u062c\u0643 \u0648\u062a\u0638\u0646\u0647 \u0627\u0646\u0647 \u0634\u0626 \u0645\u0639\u0642\u062f \u0648\u0635\u0639\u0628 \u00a0\u0641\u0643\u0631\u062a\u0647 \u0648\u0627\u0636\u062d\u0629 \u062c\u062f\u0627\u064b \u00a0<em>\u0648\u0647\u064a<\/em>\u00a0\u0627\u0646 \u0627\u0644classes\u0627\u0644\u062a\u064a\u00a0\u062a\u0633\u062a\u062e\u062f\u0645\u0647\u0627 \u0641\u064a \u0628\u0631\u0627\u0645\u062c\u0643 \u064a\u0645\u0643\u0646 \u0627\u0646 \u062a\u0633\u062a\u0628\u062f\u0644 \u0628 classes \u0627\u062e\u0631\u0649 \u0648\u0627\u0631\u062b\u0629 \u0645\u0646 \u0646\u0641\u0633 \u0627\u0644classes \u0627\u0644\u0627\u0633\u0627\u0633\u064a\u0629 \u0627\u0648 \u0627\u0646 \u062a\u0643\u0648\u0646 \u0647\u0646\u0627\u0643 Interface \u0645\u0639\u064a\u0646\u0629 \u0648\u0631\u062b \u0645\u0646\u0647\u0627 class \u0627\u0644\u0630\u064a \u062a\u0633\u062a\u062e\u062f\u0645\u0647 \u0648\u0639\u0646\u062f\u0647\u0627 \u064a\u0645\u0643\u0646 \u062a\u0628\u062f\u064a\u0644 \u0627\u0644 class \u0628\u0627\u062e\u0631 \u0648\u0631\u062b \u0645\u0646 \u0646\u0641\u0633 \u0627\u0644 Interface<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0628\u0627\u0633\u0644\u0648\u0628 \u0627\u0644\u0627\u062e\u0631 \u0627\u0646 \u062a\u0643\u0648\u0646 \u0627\u0644\u0627\u062c\u0632\u0627\u0621 \u0627\u0644\u062a\u064a \u062a\u0633\u062a\u062e\u062f\u0645\u0647\u0627 \u0641\u064a \u0628\u0631\u0646\u0627\u0645\u062c\u0643 \u0642\u0627\u0628\u0644\u0629 \u0644\u0644\u0627\u0633\u062a\u0628\u062f\u0627\u0644 \u0628\u0627\u062c\u0632\u0627\u0621 \u0627\u062e\u0631\u0649 \u0628\u062f\u0648\u0646 \u0627\u0644\u062a\u0627\u062b\u064a\u0631 \u0639\u0644\u0649 \u0639\u0645\u0644 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c.<\/span><\/p>\n<p dir=\"ltr\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\"><strong>&#8211; Interface Segregation Principle\u00a0(<b>ISP<\/b>)<\/strong><\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0645\u0628\u062f\u0623 \u0641\u0635\u0644 \u0627\u0644\u0648\u0627\u062c\u0647\u0629<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0646\u0639\u0646\u064a \u0628\u0647\u0630\u0627 \u0627\u0644\u0645\u0628\u062f\u0623 \u0627\u0646\u0646\u0627 \u0644\u0633\u0646\u0627 \u0628\u062d\u0627\u062c\u0629 \u0643\u062a\u0627\u0628\u0629 <em>Methods<\/em> \u0644\u0633\u0646\u0627 \u0628\u062d\u0627\u062c\u0629 \u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645\u0647 , \u0628\u0645\u0639\u0646\u0649 \u0627\u0648\u0636\u062d \u0627\u0646\u0646\u0627 \u0646\u0642\u0648\u0645 \u0628\u0639\u0645\u0644 <em>Interface<\/em> \u0644\u0644\u0627\u062c\u0632\u0627\u0621 \u0627\u0644\u062a\u064a \u0646\u0631\u064a\u062f\u0647\u0627 \u0645\u0646\u0641\u0635\u0644\u0629 \u0628\u0639\u0636\u0647\u0627 \u0639\u0646 \u0628\u0639\u0636 \u0628\u062f\u0644\u0627\u064b \u0645\u0646 \u0639\u0645\u0644 \u0648\u0627\u062d\u062f\u0629 \u0643\u0628\u064a\u0631\u0629 \u062a\u0634\u0645\u0644 \u0643\u0644 \u0634\u0626.<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0645\u062b\u0627\u0644: \u0644\u0648 \u0627\u0646 \u0644\u062f\u064a\u0646\u0627 Interface \u0633\u0646\u0642\u0648\u0645 \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645\u0647\u0627 \u0641\u064a Class , \u0647\u0630\u0647 \u0627\u0644\u0640\u00a0Interface \u0633\u062a\u062d\u062a\u0648\u064a \u0639\u0644\u0649 \u0639\u062f\u0629 \u062f\u0648\u0627\u0644 \u062a\u0642\u0648\u0645 \u0628\u0627\u0633\u062a\u0631\u062c\u0627\u0639 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645\u064a\u0646 \u0648\u0627\u0644\u062a\u062f\u0648\u064a\u0646\u0627\u062a \u0645\u0646 \u0642\u0627\u0639\u062f\u0629 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a\u00a0<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0627\u0633\u0645 \u0627\u0644Interface IBlog<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0648\u0644\u064a\u0643\u0646 \u00a0GetSingleUser(int id) , GetAllUsers() , GetSinglePost(int id) , GetAllPosts()<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0644\u0648 \u0627\u0641\u062a\u0631\u0636\u0646\u0627 \u0627\u0646\u0646\u0627 \u0641\u064a \u062d\u0627\u062c\u0629 \u0644\u0644\u062a\u062f\u0648\u064a\u0646\u0627\u062a \u0641\u0642\u0637 \u0628\u062f\u0648\u0646 \u0627\u0644\u062d\u0627\u062c\u0629 \u0644\u0644User \u0627\u0648 \u0628\u064a\u0627\u0646\u062a\u0647 \u0641\u064a \u062d\u0627\u0644 \u0642\u0645\u0646\u0627 \u0628\u0648\u0631\u0627\u062b\u0629 \u0647\u0630\u0647 \u0627\u0644Interface \u0633\u0646\u0643\u0648\u0646 \u0628\u062d\u0627\u062c\u0629 \u0627\u0644\u0649 \u0639\u0645\u0644 Implementation \u0644\u062c\u0645\u064a\u0639 \u0627\u0644Methods \u0628\u062f\u0627\u062e\u0644\u0647\u0627 \u062d\u062a\u0649 \u0644\u0648 \u0633\u0646\u062a\u0631\u0643\u0647\u0627 \u0641\u0627\u0631\u063a\u0629 <\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0641\u064a \u062d\u0627\u0644\u062a\u0646\u0627 \u0633\u062a\u0628\u0642\u0649 GetSingleUser(int id) , GetAllUsers() \u0628\u062f\u0648\u0646 \u0627\u0643\u0648\u0627\u062f \u0628\u062f\u0627\u062e\u0644\u0647\u0627 \u0644\u0627\u0646\u0646\u0627 \u0644\u0627\u0646\u0631\u064a\u062f\u0647\u0627 \u0648\u0644\u0643\u0646 \u0645\u062c\u0628\u0631\u064a\u0646 \u0644\u0627\u0646 \u062a\u0643\u0648\u0646 \u0645\u0648\u062c\u0648\u062f\u0629 \u0644\u0627\u0646\u0646\u0627 \u0648\u0631\u062b\u0646\u0627 \u0645\u0646 \u0627\u0644Interface \u0627\u0644\u062a\u064a \u062a\u062d\u062a\u0648\u064a\u0647\u0627 , \u0647\u0644 \u0647\u0630\u0627 \u0645\u0646\u0637\u0642\u064a \u0627\u0648 \u0635\u062d\u064a\u062d !<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0627\u0644\u0635\u062d\u064a\u062d \u0647\u0646\u0627 \u0627\u0646 \u0646\u0642\u0648\u0645 \u0628\u0639\u0645\u0644 2 Interfaces \u0645\u0646\u0641\u0635\u0644\u0629 \u0648\u0627\u062d\u062f\u0629 \u062a\u062f\u0639\u0649 IUserOperations \u0648\u0646\u0642\u0648\u0645 \u0641\u064a\u0647\u0627 \u0628\u0627\u0636\u0627\u0641\u0629\u00a0GetSingleUser(int id) , GetAllUsers()<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0648\u0627\u062e\u0631\u0649 \u062a\u062f\u0639\u0649 IPostOperations \u0648\u0646\u0642\u0648\u0645 \u0641\u064a\u0647\u0627 \u0628\u0627\u0636\u0627\u0641\u0629\u00a0GetSinglePost(int id) , GetAllPosts()<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0648\u0641\u064a \u062d\u0627\u0644 \u0627\u062d\u062a\u062c\u0646\u0627 \u0627\u0644\u0649 \u0648\u0627\u062d\u062f\u0629 \u0645\u0646\u0647\u0645 \u0646\u0642\u0648\u0645 \u0628\u0648\u0631\u0627\u062b\u062a\u0647\u0627 \u0645\u0646\u0641\u0635\u0644\u0629 \u0627\u0648 \u0646\u0631\u062b \u0643\u0644\u064a\u0647\u0645\u0627 , \u0644\u0627\u0646\u0647 \u0645\u062f\u0639\u0648\u0645 \u0648\u0631\u0627\u062b\u0629 \u0639\u062f\u0629 Interfaces \u0628\u0639\u0643\u0633 \u0627\u0644\u0648\u0631\u0627\u062b\u0629 \u0644\u0644 Class \u064a\u0643\u0648\u0646 \u0648\u0627\u062d\u062f \u0641\u0642\u0637.<\/span><\/p>\n<p dir=\"ltr\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\"><strong>&#8211; Dependency Inversion Principle\u00a0(<b>DIP<\/b>)<\/strong><\/span><\/p>\n<blockquote>\n<p dir=\"ltr\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">Abstractions should not depend on the details. Details should depend on the abstractions.<\/span><\/p>\n<p dir=\"ltr\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">Depend on abstractions, not on concretions.<\/span><\/p>\n<p dir=\"ltr\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">High-level modules should not depend on low-level modules. Both should depend on abstractions<\/span><\/p>\n<\/blockquote>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u064a\u0639\u0646\u064a \u0645\u0628\u062f\u0623 \u0639\u0643\u0633 \u0627\u0644\u062a\u0628\u0639\u064a\u0629 \u0627\u0646 \u0646\u0641\u0635\u0644 \u0627\u062c\u0632\u0627\u0621 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0646\u0627\u0621 \u0627\u0644\u0649 \u0648\u062d\u062f\u0627\u062a \u0635\u063a\u064a\u0631\u0629 \u062a\u0643\u0648\u0646 \u0639\u0627\u0645\u0629 \u0644\u064a\u0633\u062a \u0645\u0639\u062a\u0645\u062f\u0629 \u0639\u0644\u0649 \u0628\u0639\u0636\u0647\u0627 \u0628\u0634\u0643\u0644 \u0643\u0627\u0645\u0644 \u0628\u062d\u064a\u062b \u0627\u0646\u0647 \u0641\u064a \u062d\u064a\u0646 \u0627\u0631\u062f\u0646\u0627 \u0627\u0633\u062a\u062e\u062f\u0627\u0645\u0647\u0627 \u0646\u062c\u0645\u0639 \u0647\u0630\u0647 \u0627\u0644\u0627\u062c\u0632\u0627\u0621 \u0633\u0648\u064a\u0627 \u0648\u064a\u0645\u0643\u0646\u0646\u0627 \u0627\u0633\u062a\u0628\u062f\u0627\u0644 \u062c\u0632\u0621 \u0628\u0627\u062e\u0631 \u0628\u062f\u0648\u0646 \u0627\u0644\u0627\u0639\u062a\u0645\u0627\u062f\u064a\u0629 \u0648\u062d\u062f\u0648\u062b \u0627\u062e\u0637\u0627\u0621 \u0641\u064a \u0627\u0644\u062a\u0637\u0628\u064a\u0642.<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u064a\u0645\u0643\u0646\u0646\u0627 \u0627\u0639\u062a\u0628\u0627\u0631 \u0627\u0644\u0640High-level modules \u0647\u064a \u0627\u0644 classes \u0641\u064a \u0628\u0631\u0646\u0627\u0645\u062c\u0646\u0627 \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0627\u0644 Application Logic \u0627\u0644\u062e\u0627\u0635 \u0628\u0646\u0627\u00a0<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0641\u064a \u062d\u064a\u0646 \u0627\u0644\u0640\u00a0low-level modules \u0627\u0644\u0627\u062c\u0632\u0627\u0621 \u0627\u0644\u062a\u064a \u062a\u0642\u0648\u0645 \u0628\u0639\u0645\u0644 \u0627\u0644\u0639\u0645\u0644\u064a\u0627\u062a \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c \u0645\u062b\u0644 \u062c\u0644\u0628 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0645\u0646 \u0642\u0627\u0639\u062f\u0629 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0648 \u0643\u062a\u0627\u0628\u0629 \u0628\u064a\u0627\u0646\u0627\u062a \u0641\u064a \u0645\u0644\u0641 \u0645\u062b\u0644\u0627\u064b, \u062a\u0627\u062e\u0630 \u0627\u0644\u0635\u064a\u063a\u0629 \u0639\u0627\u0645\u0629 \u0648\u0646\u0642\u0648\u0645 \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645\u0647\u0627 \u0645\u0646 \u0627\u0644High-level modules \u0644\u0644\u0642\u064a\u0627\u0645 \u0628\u0627\u0644\u0648\u0638\u0627\u0626\u0641 \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0646\u0627.<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u064a\u062c\u0628 \u0627\u0646 \u0644\u0627\u064a\u0643\u0648\u0646\u0648 \u0645\u0639\u062a\u0645\u062f\u064a\u0646 \u0639\u0644\u0649 \u0628\u0639\u0636\u0647\u0645\u0627 \u0628\u0634\u0643\u0644 \u0643\u0644\u064a \u0628\u0644 \u0627\u0646 \u064a\u0643\u0648\u0646\u0648 \u0645\u0631\u0646\u064a\u0646 \u0644\u0644\u062a\u063a\u064a\u064a\u0631<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0628\u062d\u064a\u062b \u0644\u0648 \u063a\u064a\u0631\u0646\u0627 \u0627\u0644 High-level module \u0644\u0627\u064a\u0624\u062f\u064a \u0627\u0644\u0649 \u062a\u0644\u0641 \u0627\u062c\u0632\u0627\u0621 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c \u0648\u062a\u0648\u0642\u0641 \u0648\u0638\u0627\u0626\u0641\u0647\u00a0<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0641\u0645\u062b\u0644\u0627 \u0644\u0648 \u0627\u0644\u062a\u0637\u0628\u064a\u0642 \u0627\u0644\u062e\u0627\u0635\u00a0\u064a\u0639\u062a\u0645\u062f \u0639\u0644\u0649 \u0627\u0633\u062a\u0631\u062c\u0627\u0639 \u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0648 \u0627\u0631\u0633\u0627\u0644\u0647\u0627 \u0644\u0642\u0627\u0639\u062f\u0629 \u0628\u064a\u0627\u0646\u0627\u062a \u0645\u0646 SQL Server\u00a0<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0639\u0646\u062f \u0627\u0644\u062a\u063a\u064a\u064a\u0631 \u0644\u0640 MySql \u0633\u064a\u0643\u0648\u0646 \u0627\u0644\u062a\u063a\u064a\u064a\u0631 \u0635\u0639\u0628 \u0628\u0639\u0636 \u0627\u0644\u0634\u0626 \u0648\u0633\u062a\u062d\u062a\u0627\u062c \u0644\u062a\u0639\u062f\u064a\u0644 \u0627\u0644\u0639\u062f\u064a\u062f \u0645\u0646 \u0627\u0644\u0627\u0634\u064a\u0627\u0621\u00a0<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0644\u0648 \u0642\u0645\u062a \u0628\u0639\u0645\u0644\u0647 \u0645\u0646 \u0627\u0644\u0628\u062f\u0627\u064a\u0629 \u0627\u0646\u0647 SQL(DataBase) \u0648\u0627\u0644\u0627\u062e\u062a\u0644\u0627\u0641 \u064a\u0643\u0648\u0646 \u0641\u064a \u0627\u0644 Implementation \u0627\u0644\u062f\u0627\u062e\u0644\u064a\u00a0<\/span><\/p>\n<p dir=\"rtl\" style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0633\u062a\u0642\u0648\u0645 \u0628\u062a\u063a\u064a\u064a\u0631 \u0627\u0644\u0637\u0631\u064a\u0642\u0629 \u0648\u0643\u0644 \u0634\u0626 \u0633\u064a\u0639\u0645\u0644 \u0628\u062f\u0648\u0646 \u0645\u0634\u0627\u0643\u0644<\/span><\/p>\n<hr \/>\n<p style=\"text-align: right;\"><span style=\"font-size: 14pt;\">DRY Code<\/span><\/p>\n<p style=\"text-align: right;\"><span style=\"font-size: 14pt;\">Don&#8217;t Repeat Your Self<\/span><\/p>\n<p style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0644\u0627\u062a\u0643\u0631\u0631 \u0645\u0627\u062a\u0641\u0639\u0644\u0647 \u0627\u0643\u062b\u0631 \u0645\u0646 \u0645\u0631\u0629\u00a0<\/span><\/p>\n<p style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0627\u0630\u0627 \u0648\u062c\u062f\u062a \u0643\u0648\u062f \u0644\u062f\u064a\u0643 \u062a\u0633\u062a\u062e\u062f\u0645\u0647 \u0627\u0643\u062b\u0631 \u0645\u0646 \u0645\u0631\u0629 \u0642\u0645 \u0628\u062a\u0636\u0645\u064a\u0646\u0647 \u0641\u064a Method \u062a\u0633\u062a\u062f\u0639\u064a\u0647\u0627 \u0641\u064a \u0643\u0644 \u0645\u0631\u0629 , \u0647\u0630\u0627 \u0633\u064a\u0633\u0647\u0644 \u0639\u0644\u064a\u0643 \u062a\u0639\u062f\u064a\u0644 \u0648\u062a\u062d\u0633\u064a\u0646 \u0627\u0644\u0643\u0648\u062f \u0648\u062a\u0648\u0633\u064a\u0639\u0647 \u0628\u0639\u0643\u0633 \u062a\u0643\u0631\u0627\u0631\u0647 \u0639\u062f\u0629 \u0645\u0631\u0627\u062a \u0648\u0641\u064a \u062d\u0627\u0644 \u0627\u0643\u062a\u0634\u0627\u0641 \u062e\u0637\u0623 \u0633\u062a\u062d\u062a\u0627\u062c \u0644\u0644\u0628\u062d\u062b \u0639\u0646 \u0643\u0644 \u0627\u0644\u0627\u0645\u0627\u0643\u0646 \u0648\u062a\u0639\u062f\u064a\u0644\u0647.<\/span><\/p>\n<p style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0623\u0631\u062c\u0648 \u0627\u0646 \u0627\u0643\u0648\u0646 \u0642\u062f \u0627\u0641\u062f\u062a\u0643\u0645\u00a0<\/span><\/p>\n<p style=\"text-align: right;\"><span style=\"font-size: 14pt;\">\u0648\u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0641\u0642\u0637 \u0642\u0648\u0645\u0648 \u0628\u0627\u0644\u0628\u062d\u062b \u0641\u064a \u062c\u0648\u062c\u0644 &#8220;Google it &#8221; \u0627\u0644\u0645\u0648\u0636\u0648\u0639 \u0631\u0627\u0626\u0639 \u0648\u0634\u064a\u0642 \u062c\u062f\u0627\u064b \ud83d\ude00 .<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0627\u0644\u0633\u0644\u0627\u0645 \u0639\u0644\u064a\u0643\u0645 \u064a\u0648\u062c\u062f \u0639\u062f\u0629 \u0645\u0628\u0627\u062f\u0626 \u0644\u062a\u0635\u0645\u064a\u0645 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0627\u062a \u0628\u0627\u0644\u0637\u0631\u064a\u0642\u0629 \u0643\u0627\u0626\u0646\u064a\u0629 \u0627\u0644\u062a\u0648\u062c\u064a\u0647 Object Oriented Desing\u00a0\u0647\u0630\u0647 \u0627\u0644\u0645\u0628\u0627\u062f\u0626 \u062a\u062c\u0639\u0644 \u0645\u0646 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0627\u062a \u0627\u0644\u062a\u064a \u0646\u0642\u0648\u0645 \u0628\u0643\u062a\u0627\u0628\u062a\u0647\u0627 \u0648\u0627\u0636\u062d\u0629 \u0627\u0643\u062b\u0631 \u0641\u064a \u0637\u0631\u064a\u0642\u0629 \u0639\u0645\u0644\u0647\u0627 \u0648\u0633\u0647\u0644\u064c \u0635\u064a\u0627\u0646\u062a\u0647\u0627 \u0648\u062a\u0637\u0648\u064a\u0631\u0647\u0627 \u0628\u062f\u0648\u0646 \u0625\u0644\u062d\u0627\u0642 \u0627\u064a \u062a\u063a\u064a\u064a\u0631 \u0627\u0648 \u0636\u0631\u0631 \u0641\u064a \u0627\u0633\u0627\u0633 \u0628\u0631\u0627\u0645\u062c\u0643. \u0627\u0648\u0644 \u062e\u0645\u0633 \u0645\u0628\u0627\u062f\u0626 \u0645\u062c\u0645\u0648\u0639\u0629 \u0641\u064a \u0643\u0644\u0645\u0629 SOLID Principles \u0648\u0642\u062f \u0642\u0627\u0645 \u0628\u0628\u062f\u0621 \u0647\u0630\u0647 \u0627\u0644\u0645\u0628\u0627\u062f\u0626\u00a0Robert Cecil Martin \u0627\u0644\u0645\u0639\u0631\u0648\u0641 \u0628\u0627\u0633\u0645\u00a0Uncle Bob. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-322","post","type-post","status-publish","format-standard","hentry","category-2"],"aioseo_notices":[],"views":1332,"_links":{"self":[{"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=\/wp\/v2\/posts\/322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=322"}],"version-history":[{"count":16,"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=\/wp\/v2\/posts\/322\/revisions"}],"predecessor-version":[{"id":399,"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=\/wp\/v2\/posts\/322\/revisions\/399"}],"wp:attachment":[{"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}