{"id":178,"date":"2014-12-13T01:44:42","date_gmt":"2014-12-12T23:44:42","guid":{"rendered":"https:\/\/gokhan-gokalp.com\/?p=178"},"modified":"2014-12-13T01:44:42","modified_gmt":"2014-12-12T23:44:42","slug":"open-closed-principle-ocp-acik-kapali-prensibi","status":"publish","type":"post","link":"https:\/\/gokhan-gokalp.com\/tr\/open-closed-principle-ocp-acik-kapali-prensibi\/","title":{"rendered":"Open Closed Principle (OCP) \u2013 A\u00e7\u0131k Kapal\u0131 Prensibi"},"content":{"rendered":"<p><center><a href=\"\/wp-content\/uploads\/2014\/12\/ocp.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-179 lazyload\" data-src=\"\/wp-content\/uploads\/2014\/12\/ocp.jpg\" alt=\"ocp\" width=\"418\" height=\"287\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2014\/12\/ocp.jpg 418w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2014\/12\/ocp-300x205.jpg 300w\" data-sizes=\"(max-width: 418px) 100vw, 418px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 418px; --smush-placeholder-aspect-ratio: 418\/287;\" \/><\/a><\/center>Evet bir \u00f6nceki <a href=\"https:\/\/gokhan-gokalp.com\/solid-nedir-ve-single-responsibility-principle-srp\/\">Single Responsibility<\/a>\u00a0makalesinden sonra s\u0131ra geldi 2. prensibimiz olan <strong>Open-Closed<\/strong> (A\u00e7\u0131k Kapal\u0131) prensibine.\u00a0Prensiplerin hepsinin ayr\u0131 bir \u00f6nemi var fakat open-closed&#8217;\u0131n\u00a0\u00f6nemi biraz daha \u00f6nde geliyor, en az\u0131ndan benim i\u00e7in :)<\/p>\n<p>Ger\u00e7ek d\u00fcnyada, bir uygulama geli\u015ftirme s\u00fcrecinde veya sonras\u0131nda, s\u00fcrekli m\u00fc\u015fterilerimizden yeni istekler ve\u00a0g\u00fcncelleme talepleri gelmektedir.<\/p>\n<p>Bu gelecek olan isteklerin sistemimize rahatl\u0131kla entegre olabilmesi veya kolayl\u0131kla geni\u015fletilebilmesi\u00a0i\u00e7in (g\u00fcn\u00fcm\u00fczde zaman art\u0131k \u00e7ok de\u011ferli bir k\u0131stas oldu\u011fu i\u00e7in) uygulamam\u0131z\u0131\u00a0<strong>geli\u015fime a\u00e7\u0131k, de\u011fi\u015fime kapal\u0131<\/strong> bir \u015fekilde geli\u015ftirmeliyiz. Genelde uygulamalar\u0131m\u0131z\u00a0\u00fczerinde de\u011fi\u015fiklik veya g\u00fcncellemeler ka\u00e7\u0131n\u0131lmaz bir ger\u00e7ektir. Her ne kadar ileriye d\u00f6n\u00fck <strong>esnek<\/strong> (Extendability) bir tasar\u0131m olu\u015fturursak,\u00a0kar\u015f\u0131m\u0131za gelecek olan isteklerin sistemimize uygulanabilirli\u011fini, kara kara d\u00fc\u015f\u00fcnmeden i\u015fleme koyabilmemizi\u00a0sa\u011flar.<\/p>\n<p>Konunun daha iyi anla\u015f\u0131labilmesi a\u00e7\u0131s\u0131ndan, en g\u00fczel buldu\u011fum ve zaman\u0131nda benimde anlayabilmem a\u00e7\u0131s\u0131ndan en iyi olan \u00f6rnek \u00fczerinden gidece\u011fim.<\/p>\n<p>\u00d6rne\u011fimizde <strong>Rectangle<\/strong>(Dikd\u00f6rtgen) isminde bir class\u2019\u0131m\u0131z mevcut ve bu class\u2019\u0131m\u0131z Width ve Height property\u2019lerine sahip. Birde <strong>AreaCalculator <\/strong>isminde bir class\u2019\u0131m\u0131z ve burada <strong>Area<\/strong> isminde bir metot ile <strong>Rectangle<\/strong> tipinde bir dizi alarak basit bir \u015fekilde alanlar\u0131n\u0131 hesapl\u0131yoruz.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2014\/12\/ocp-1.jpg\"><img decoding=\"async\" class=\"alignleft size-full wp-image-180 lazyload\" data-src=\"\/wp-content\/uploads\/2014\/12\/ocp-1.jpg\" alt=\"ocp-1\" width=\"336\" height=\"380\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2014\/12\/ocp-1.jpg 336w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2014\/12\/ocp-1-265x300.jpg 265w\" data-sizes=\"(max-width: 336px) 100vw, 336px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 336px; --smush-placeholder-aspect-ratio: 336\/380;\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Evet her \u015fey olduk\u00e7a g\u00fczel g\u00f6r\u00fcn\u00fcyor de\u011fil mi?\u00a0<strong>Rectangle<\/strong>\u2019\u0131n alan\u0131n\u0131 hesaplayabiliyoruz. Peki m\u00fc\u015fterimizden gelen bir istek ile <strong>Circle<\/strong>(Daire)\u2019\u0131nda alan\u0131n\u0131 hesaplamak istedi\u011fini belirtti bize.<\/p>\n<p>Akl\u0131m\u0131za gelen ilk \u015fey olarak art\u0131k <strong>Rectangle<\/strong> tipinde bir dizi yerine <strong>object<\/strong> tipinde dizi tan\u0131mlayarak bunu da ufak bir if else blo\u011funa\u00a0sokarak bir type kontrol\u00fc ile halledebiliriz san\u0131r\u0131m&#8230;<\/p>\n<p>Hemen kodumuzun son haline bir bakal\u0131m:<\/p>\n<p><a href=\"\/wp-content\/uploads\/2014\/12\/ocp-2.jpg\"><img decoding=\"async\" class=\"alignleft size-full wp-image-181 lazyload\" data-src=\"\/wp-content\/uploads\/2014\/12\/ocp-2.jpg\" alt=\"ocp-2\" width=\"439\" height=\"389\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2014\/12\/ocp-2.jpg 439w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2014\/12\/ocp-2-300x265.jpg 300w\" data-sizes=\"(max-width: 439px) 100vw, 439px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 439px; --smush-placeholder-aspect-ratio: 439\/389;\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u015euan i\u00e7in yine olduk\u00e7a g\u00fczel duruyor :) San\u0131r\u0131m m\u00fc\u015fterimizin iste\u011fini yerine\u00a0getirmi\u015f olduk ve art\u0131k <strong>Circle<\/strong>\u2019\u0131n da alan\u0131n\u0131 hesaplayabiliyoruz.<\/p>\n<p>Her \u015fey g\u00fczel gidiyor derken m\u00fc\u015fterimizden gelen bir haber ile tekrar bir yeni iste\u011fi oldu\u011funu belirtiyor. Bu seferde <strong>Triangles<\/strong> (\u00dc\u00e7gen) i\u00e7in bir alan hesaplamak istiyor. Elbette bunu hesaplamak \u00e7ok zor de\u011fil fakat yine kodumuzda de\u011fi\u015fiklikler gerekiyor.<\/p>\n<p>Git gide <strong>open-closed<\/strong>\u2019a kar\u015f\u0131 bir yap\u0131 kuruyoruz. <strong>Geli\u015fime a\u00e7\u0131k, de\u011fi\u015fime kapal\u0131<\/strong> olmam\u0131z gerekirken s\u00fcrekli kodumuzu de\u011fi\u015ftiriyoruz.\u00a0Bu duruma\u00a0hemen open-closed prensibine uygun bir yakla\u015f\u0131mla bakarsak\u00a0<strong>AreaCalculator<\/strong> class\u2019\u0131m\u0131z <strong>de\u011fi\u015fime kapal\u0131 de\u011fildir<\/strong> aksine yeni istek i\u00e7in s\u00fcrekli de\u011fi\u015ftirmemiz\u00a0gerekmektedir. Asl\u0131nda olaya developer olarak bakarsak, kendi kendimize bir ek i\u015f \u00e7\u0131kar\u0131yoruz burada :)<\/p>\n<p>Evet \u015fimdi open-closed prensibine\u00a0g\u00f6re bu class\u2019\u0131m\u0131z\u0131 <strong>geli\u015fime<\/strong>\u00a0bir a\u00e7al\u0131m ve bize neler katabilecek bir bakal\u0131m hemen.<\/p>\n<p>\u00d6ncelikle OOP&#8217;in g\u00fczelliklerinden yararlanarak hemen<strong> Shape<\/strong> isminde bir <strong>abstract<\/strong> class olu\u015fturarak bu class ile \u015fekli\u00a0soyutlay\u0131p\u00a0istedi\u011fimiz tipte t\u00fcretebilece\u011fiz. Her birinin<strong> kendi alan hesaplama form\u00fcl\u00fc<\/strong> bulunacak. Bu \u015fekilde bir yakla\u015f\u0131mla\u00a0metodumuzu\u00a0<strong>geli\u015fime a\u00e7\u0131k<\/strong>,\u00a0<strong>de\u011fi\u015fime kapal\u0131<\/strong>\u00a0olarak belirlemi\u015f olduk.<\/p>\n<p>Hemen kodun son haline\u00a0bakacak olursak:<\/p>\n<p><a href=\"\/wp-content\/uploads\/2014\/12\/ocp-3.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-182 lazyload\" data-src=\"\/wp-content\/uploads\/2014\/12\/ocp-3.jpg\" alt=\"ocp-3\" width=\"619\" height=\"443\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2014\/12\/ocp-3.jpg 619w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2014\/12\/ocp-3-300x214.jpg 300w\" data-sizes=\"(max-width: 619px) 100vw, 619px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 619px; --smush-placeholder-aspect-ratio: 619\/443;\" \/><\/a><\/p>\n<p>Art\u0131k her ne kadar farkl\u0131 hesaplama ve \u015fekil iste\u011fi gelse de biliyoruz ki bizim i\u00e7in farketmez, kolayl\u0131kla metodumuzu geni\u015fletebiliriz.<\/p>\n<p>Bir makalenin daha sonuna geldik, umar\u0131m faydal\u0131 olabilmi\u015fsem ne mutlu bana.<\/p>\n<p>Takipte kal\u0131n&#8230; :)<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Evet bir \u00f6nceki Single Responsibility\u00a0makalesinden sonra s\u0131ra geldi 2. prensibimiz olan Open-Closed (A\u00e7\u0131k Kapal\u0131) prensibine.\u00a0Prensiplerin hepsinin ayr\u0131 bir \u00f6nemi var fakat open-closed&#8217;\u0131n\u00a0\u00f6nemi biraz daha \u00f6nde geliyor, en az\u0131ndan benim i\u00e7in :) Ger\u00e7ek d\u00fcnyada, bir uygulama geli\u015ftirme s\u00fcrecinde veya sonras\u0131nda, s\u00fcrekli m\u00fc\u015fterilerimizden yeni istekler ve\u00a0g\u00fcncelleme talepleri&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/gokhan-gokalp.com\/tr\/open-closed-principle-ocp-acik-kapali-prensibi\/\">Devam\u0131n\u0131 okuyun<span class=\"screen-reader-text\">Open Closed Principle (OCP) \u2013 A\u00e7\u0131k Kapal\u0131 Prensibi<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46,21],"tags":[32,13,28,14,15,31,29],"class_list":["post-178","post","type-post","status-publish","format-standard","hentry","category-nesne-yonelimli-programlama-object-oriented-programming","category-tasarim-prensipleri-design-principles","tag-acik-kapali-prensibi","tag-nesne-yonelimli-programlama","tag-object-oriented-prensipleri","tag-object-oriented-programming","tag-oop","tag-open-closed-principle","tag-solid","entry"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"tr","enabled_languages":["en","tr"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"tr":{"title":false,"content":false,"excerpt":false}}},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Open Closed Principle (OCP) \u2013 A\u00e7\u0131k Kapal\u0131 Prensibi  - G\u00f6khan G\u00f6kalp<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gokhan-gokalp.com\/open-closed-principle-ocp-acik-kapali-prensibi\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Open Closed Principle (OCP) \u2013 A\u00e7\u0131k Kapal\u0131 Prensibi  - G\u00f6khan G\u00f6kalp\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gokhan-gokalp.com\/open-closed-principle-ocp-acik-kapali-prensibi\/\" \/>\n<meta property=\"og:site_name\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-12T23:44:42+00:00\" \/>\n<meta name=\"author\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/open-closed-principle-ocp-acik-kapali-prensibi\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/open-closed-principle-ocp-acik-kapali-prensibi\\\/\"},\"author\":{\"name\":\"G\u00f6khan G\u00f6kalp\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"headline\":\"Open Closed Principle (OCP) \u2013 A\u00e7\u0131k Kapal\u0131 Prensibi\",\"datePublished\":\"2014-12-12T23:44:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/open-closed-principle-ocp-acik-kapali-prensibi\\\/\"},\"wordCount\":603,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"keywords\":[\"A\u00e7\u0131k Kapal\u0131 Prensibi\",\"Nesne Y\u00f6nelimli Programlama\",\"object oriented prensipleri\",\"Object Oriented Programming\",\"OOP\",\"Open Closed Principle\",\"Solid\"],\"articleSection\":[\"Nesne Y\u00f6nelimli Programlama (Object Oriented Programming)\",\"Tasar\u0131m Prensipleri (Design Principles)\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/gokhan-gokalp.com\\\/open-closed-principle-ocp-acik-kapali-prensibi\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/open-closed-principle-ocp-acik-kapali-prensibi\\\/\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/open-closed-principle-ocp-acik-kapali-prensibi\\\/\",\"name\":\"Open Closed Principle (OCP) \u2013 A\u00e7\u0131k Kapal\u0131 Prensibi - G\u00f6khan G\u00f6kalp\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#website\"},\"datePublished\":\"2014-12-12T23:44:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/open-closed-principle-ocp-acik-kapali-prensibi\\\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gokhan-gokalp.com\\\/open-closed-principle-ocp-acik-kapali-prensibi\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/open-closed-principle-ocp-acik-kapali-prensibi\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gokhan-gokalp.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Open Closed Principle (OCP) \u2013 A\u00e7\u0131k Kapal\u0131 Prensibi\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#website\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/\",\"name\":\"G\u00f6khan G\u00f6kalp\",\"description\":\"C# &amp; Python lover\",\"publisher\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gokhan-gokalp.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\",\"name\":\"G\u00f6khan G\u00f6kalp\",\"pronouns\":\"he\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659\",\"contentUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659\",\"caption\":\"G\u00f6khan G\u00f6kalp\"},\"logo\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659\"},\"sameAs\":[\"https:\\\/\\\/gokhan-gokalp.com\"],\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/tr\\\/author\\\/gok-gokalp\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Open Closed Principle (OCP) \u2013 A\u00e7\u0131k Kapal\u0131 Prensibi  - G\u00f6khan G\u00f6kalp","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gokhan-gokalp.com\/open-closed-principle-ocp-acik-kapali-prensibi\/","og_locale":"tr_TR","og_type":"article","og_title":"Open Closed Principle (OCP) \u2013 A\u00e7\u0131k Kapal\u0131 Prensibi  - G\u00f6khan G\u00f6kalp","og_url":"https:\/\/gokhan-gokalp.com\/open-closed-principle-ocp-acik-kapali-prensibi\/","og_site_name":"G\u00f6khan G\u00f6kalp","article_published_time":"2014-12-12T23:44:42+00:00","author":"G\u00f6khan G\u00f6kalp","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"G\u00f6khan G\u00f6kalp","Tahmini okuma s\u00fcresi":"3 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/gokhan-gokalp.com\/open-closed-principle-ocp-acik-kapali-prensibi\/#article","isPartOf":{"@id":"https:\/\/gokhan-gokalp.com\/open-closed-principle-ocp-acik-kapali-prensibi\/"},"author":{"name":"G\u00f6khan G\u00f6kalp","@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"headline":"Open Closed Principle (OCP) \u2013 A\u00e7\u0131k Kapal\u0131 Prensibi","datePublished":"2014-12-12T23:44:42+00:00","mainEntityOfPage":{"@id":"https:\/\/gokhan-gokalp.com\/open-closed-principle-ocp-acik-kapali-prensibi\/"},"wordCount":603,"commentCount":1,"publisher":{"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"keywords":["A\u00e7\u0131k Kapal\u0131 Prensibi","Nesne Y\u00f6nelimli Programlama","object oriented prensipleri","Object Oriented Programming","OOP","Open Closed Principle","Solid"],"articleSection":["Nesne Y\u00f6nelimli Programlama (Object Oriented Programming)","Tasar\u0131m Prensipleri (Design Principles)"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/gokhan-gokalp.com\/open-closed-principle-ocp-acik-kapali-prensibi\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/gokhan-gokalp.com\/open-closed-principle-ocp-acik-kapali-prensibi\/","url":"https:\/\/gokhan-gokalp.com\/open-closed-principle-ocp-acik-kapali-prensibi\/","name":"Open Closed Principle (OCP) \u2013 A\u00e7\u0131k Kapal\u0131 Prensibi - G\u00f6khan G\u00f6kalp","isPartOf":{"@id":"https:\/\/gokhan-gokalp.com\/#website"},"datePublished":"2014-12-12T23:44:42+00:00","breadcrumb":{"@id":"https:\/\/gokhan-gokalp.com\/open-closed-principle-ocp-acik-kapali-prensibi\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gokhan-gokalp.com\/open-closed-principle-ocp-acik-kapali-prensibi\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gokhan-gokalp.com\/open-closed-principle-ocp-acik-kapali-prensibi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gokhan-gokalp.com\/"},{"@type":"ListItem","position":2,"name":"Open Closed Principle (OCP) \u2013 A\u00e7\u0131k Kapal\u0131 Prensibi"}]},{"@type":"WebSite","@id":"https:\/\/gokhan-gokalp.com\/#website","url":"https:\/\/gokhan-gokalp.com\/","name":"G\u00f6khan G\u00f6kalp","description":"C# &amp; Python lover","publisher":{"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gokhan-gokalp.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe","name":"G\u00f6khan G\u00f6kalp","pronouns":"he","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659","url":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659","contentUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659","caption":"G\u00f6khan G\u00f6kalp"},"logo":{"@id":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776170659"},"sameAs":["https:\/\/gokhan-gokalp.com"],"url":"https:\/\/gokhan-gokalp.com\/tr\/author\/gok-gokalp\/"}]}},"_links":{"self":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/comments?post=178"}],"version-history":[{"count":9,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/178\/revisions"}],"predecessor-version":[{"id":191,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/178\/revisions\/191"}],"wp:attachment":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/media?parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/categories?post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/tags?post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}