{"id":1152,"date":"2010-11-02T20:25:44","date_gmt":"2010-11-03T03:25:44","guid":{"rendered":"https:\/\/simpleprogrammer.com\/?p=1152"},"modified":"2018-01-12T12:36:58","modified_gmt":"2018-01-12T17:36:58","slug":"back-to-basics-what-is-an-interface","status":"publish","type":"post","link":"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/","title":{"rendered":"What is an Interface?"},"content":{"rendered":"<p>This is the first part of my <a href=\"https:\/\/simpleprogrammer.com\/2010\/10\/30\/getting-back-to-basics-introduction-and-why\/\">Back to Basics series<\/a>.\\n\\nOne of the basics I feel we really need to get back to is the use and understanding of the value of interfaces.\\n\\nIn languages like C# and Java, interfaces are extremely common.\u00a0 They are much more commonly used than they were 5-10 years ago.\\n\\nBut a question we have to ask ourselves is, \u201care we using them correctly?\u201d<\/p>\n<p>\\n\\n<\/p>\n<h2>What problem does the interface solve?<\/h2>\n<p>\\n\\nI want you to take a second and clear your head of how you are currently using interfaces.\\n\\nI want you to pretend for a moment that you don\u2019t know what an interface is.\\n\\nReady?\\n\\n<strong>The basic problem an interface is trying to solve is to separate how we use something from how it is implemented.<\/strong>\\n\\nWhy do we want to separate the use from the implementation?\\n\\nSo that we can write code that can work with a variety of different implementations of some set of responsibilities without having to specifically handle each implementation.\\n\\nTo put this more simply, this means that if we have a <em>Driver<\/em> class it should be able to have a method <em>Drive<\/em> that can be used to drive any car, boat, or other kind of class that implements the <em>IDriveable<\/em> interface.\\n\\nThe <em>Driver<\/em> class should not have to have a <em>DriveBoat<\/em>, <em>DriveCar<\/em> or <em>DriveX<\/em> methods for each kind of class that supports the same basic operations that are needed for it to be driven.\\n\\n<a href=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2010\/11\/driver-race-car.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-left: 0; padding-right: 0; display: inline; padding-top: 0; border: 0;\" title=\"Driver-Race-Car\" alt=\"Driver-Race-Car\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2010\/11\/driver-race-car_thumb.jpg\" width=\"487\" height=\"357\" border=\"0\" \/><\/a>\\n\\n<strong>Interfaces are trying to solve a very specific problem by allowing us to interact with objects based on what they do, not how they do it.<\/strong>\\n\\n<\/p>\n<h2>Interfaces are contracts<\/h2>\n<p>\\n\\nInterfaces allow us to specify that a particular class meets certain expectations that other classes can rely on.\\n\\nIf we have a class that implements an interface, we can be sure that it will support all the methods that are defined in that interface.\\n\\nAt first glance interfaces seem to be similar to concrete inheritance, but there is a key difference.\\n\\nConcrete inheritance says <em>Car<\/em> is an <em>Automobile<\/em>, while an interface says <em>Car<\/em> implements the <em>Drivable <\/em>interface.\\n\\nWhen a class implements an interface, it does not mean that class IS that interface.\u00a0 <strong>For this reason interfaces that completely describe the functionality of a class are usually wrong.<\/strong>\\n\\nA class can implement multiple interfaces because each interface only talks about a particular contract that class is able to fulfill.\\n\\n<\/p>\n<h2>Interfaces are always implemented by more than one class<\/h2>\n<p>\\n\\nYou might be saying \u201cno they\u2019re not, I have a class here that has an interface that no other class implements.\u201d\\n\\nTo that I say, \u201cyou are doing it wrong.\u201d\\n\\nBut, don\u2019t worry, you are not alone.\u00a0 I am doing it wrong also.\u00a0 Many of us are not using interfaces correctly anymore, but are using them instead because we are under the impression that we should never use a concrete class directly.\\n\\nWe are afraid of tightly coupling our application, so instead we are creating interfaces for every class whether or not we need an interface.\\n\\nThere are some really good reasons why I say that interfaces are always implemented by more than one class.\\n\\nRemember how we talked about how interfaces are designed to solve a particular problem?\\n\\nIn my example, I talked about how the <em>Driver <\/em>class shouldn\u2019t have to have a method of each kind of class it can drive, instead it should depend on an <em>IDriveable<\/em> interface and have one generic <em>Drive<\/em> method that can drive anything that implements <em>IDrivable<\/em>.\\n\\nMost of us accept the YAGNI principle which says \u201cYou Ain\u2019t Gonna Need It.\u201d\u00a0 If we only have a <em>Car<\/em> class and we don\u2019t have any other classes that need to be driven by the <em>Driver<\/em> class, we don\u2019t need an interface.\u00a0 YAGNI!\\n\\nAt some point we may later add a <em>Boat <\/em>class.\u00a0 Only at that point in time do we actually have a problem that the interface will solve.\u00a0 Up until that point adding the interface is anticipating a future problem to solve.\\n\\nIf you think you are good at anticipating when you will need an interface, I want you to do a little exercise.\u00a0 Go into your codebase and count all the interfaces you have.\u00a0 Then count all the classes that implement those interfaces.\u00a0 I bet the ratio is pretty close to 1 to 1.\\n\\n<\/p>\n<h2>But how will I test?\u00a0 How will I use dependency injection?<\/h2>\n<p>\\n\\nThese two reasons are probably the most justified causes for incorrectly using interfaces.\\n\\nI am guilty of justifying the creation of an interface so that I can have something to mock, and I am guilty of creating an interface just for my dependency injection framework, but it doesn\u2019t make it right.\\n\\nI can\u2019t give you an easy answer here and say that I can solve your unit testing or dependency injection problems without an interface, but I can talk about why we shouldn\u2019t be bending the source code to fit the tool or methodology.\\n\\nI talked about <a href=\"https:\/\/simpleprogrammer.com\/2010\/10\/15\/the-purpose-of-unit-testing\/\">the purpose of unit testing<\/a> before, and one of the key benefits being that unit tests help guide your design.\u00a0 Unit tests help us to decouple our application and consolidate our classes to single responsibilities by making it really painful to try and unit test classes with multiple dependencies.\\n\\n<strong>Interfaces are kind of a shortcut that allows us to get rid of having lots of dependencies in a class.<\/strong>\\n\\nWhen we turn a reference to a concrete class into an interface reference, we are cheating the system.\u00a0 We are making it easier to write a unit test by pretending that our class is decoupled because it references an interface instead of a concrete class.\u00a0 <strong>In reality it is not decoupled it is actually more coupled because our class is coupled to an interface which is coupled to a class.<\/strong>\u00a0 All we did was add a level of indirection.\\n\\nDependency injection promotes the same problem of interface abuse.\u00a0 At least it does in the way it is used in C# and Java today.\u00a0 Creating an interface solely for the purpose of being able to inject the only implementation of that interface into a class creates an unnecessary level of indirection and needlessly slows down the performance of our application.\\n\\nDon\u2019t get me wrong.\u00a0 Dependency injection is good.\u00a0 I\u2019ll save the details for another post, but I believe dependency injection\u2019s real benefit is when it is used to control which implementation of an interface is used, not when there is only one implementation of an interface.\\n\\nUltimately, I can\u2019t give you a good answer of how do you unit test or use dependency injection without abusing interfaces.\u00a0 I think you can reduce the abuse by choosing to split apart classes and actually reduce dependencies rather than simply creating an interface and injecting it into the class, but you are still going to have the problem that a <em>Car<\/em> has an <em>Engine <\/em>and if you want to unit test the car, you are either going to have to use the real engine or find a way to mock it.\\n\\nThe key problem here is that interfaces are part of the language, but unit testing and dependency injection are not.\u00a0 We are trying to make them fit in with the language by using a trick.\u00a0 The trick is we create an interface to provide a seam between classes.\u00a0 The problem is that we dilute the potency of an interface by doing so.\u00a0 What we really need is a language supported seam to allow us to easily replace implementations of concrete classes at runtime.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the first part of my Back to Basics series.\\n\\nOne of the basics I feel we really need to get back to is the use and understanding of the value of interfaces.\\n\\nIn languages like C# and Java, interfaces are extremely common.\u00a0 They are much more commonly used than they were 5-10 years ago.\\n\\nBut a&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[2185,148,1934],"tags":[],"class_list":["post-1152","post","type-post","status-publish","format-standard","hentry","category-best-practices","category-design","category-language"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Back to Basics: What is an Interface?<\/title>\n<meta name=\"description\" content=\"One of the basics I feel we really need to get back to is the use and understanding of the value of interfaces. Interfaces are trying to solve a very specific problem by allowing us to interact with objects based on what they do, not how they do it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Back to Basics: What is an Interface?\" \/>\n<meta property=\"og:description\" content=\"One of the basics I feel we really need to get back to is the use and understanding of the value of interfaces. Interfaces are trying to solve a very specific problem by allowing us to interact with objects based on what they do, not how they do it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/\" \/>\n<meta property=\"og:site_name\" content=\"Simple Programmer\" \/>\n<meta property=\"article:published_time\" content=\"2010-11-03T03:25:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-12T17:36:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2010\/11\/driver-race-car_thumb.jpg\" \/>\n<meta name=\"author\" content=\"John Sonmez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Sonmez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-what-is-an-interface\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-what-is-an-interface\\\/\"},\"author\":{\"name\":\"John Sonmez\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/1abc70edfb189184827740310672de67\"},\"headline\":\"What is an Interface?\",\"datePublished\":\"2010-11-03T03:25:44+00:00\",\"dateModified\":\"2018-01-12T17:36:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-what-is-an-interface\\\/\"},\"wordCount\":1319,\"commentCount\":28,\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-what-is-an-interface\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/driver-race-car_thumb.jpg\",\"articleSection\":[\"Best Practices\",\"Design\",\"Language\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-what-is-an-interface\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-what-is-an-interface\\\/\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-what-is-an-interface\\\/\",\"name\":\"Back to Basics: What is an Interface?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-what-is-an-interface\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-what-is-an-interface\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/driver-race-car_thumb.jpg\",\"datePublished\":\"2010-11-03T03:25:44+00:00\",\"dateModified\":\"2018-01-12T17:36:58+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/1abc70edfb189184827740310672de67\"},\"description\":\"One of the basics I feel we really need to get back to is the use and understanding of the value of interfaces. Interfaces are trying to solve a very specific problem by allowing us to interact with objects based on what they do, not how they do it.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-what-is-an-interface\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-what-is-an-interface\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-what-is-an-interface\\\/#primaryimage\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/driver-race-car_thumb.jpg\",\"contentUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/driver-race-car_thumb.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-what-is-an-interface\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/simpleprogrammer.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is an Interface?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#website\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/\",\"name\":\"Simple Programmer\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/simpleprogrammer.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/1abc70edfb189184827740310672de67\",\"name\":\"John Sonmez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g\",\"caption\":\"John Sonmez\"},\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/author\\\/jsonmez\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Back to Basics: What is an Interface?","description":"One of the basics I feel we really need to get back to is the use and understanding of the value of interfaces. Interfaces are trying to solve a very specific problem by allowing us to interact with objects based on what they do, not how they do it.","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:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/","og_locale":"en_US","og_type":"article","og_title":"Back to Basics: What is an Interface?","og_description":"One of the basics I feel we really need to get back to is the use and understanding of the value of interfaces. Interfaces are trying to solve a very specific problem by allowing us to interact with objects based on what they do, not how they do it.","og_url":"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/","og_site_name":"Simple Programmer","article_published_time":"2010-11-03T03:25:44+00:00","article_modified_time":"2018-01-12T17:36:58+00:00","og_image":[{"url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2010\/11\/driver-race-car_thumb.jpg","type":"","width":"","height":""}],"author":"John Sonmez","twitter_card":"summary_large_image","twitter_misc":{"Written by":"John Sonmez","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/#article","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/"},"author":{"name":"John Sonmez","@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/1abc70edfb189184827740310672de67"},"headline":"What is an Interface?","datePublished":"2010-11-03T03:25:44+00:00","dateModified":"2018-01-12T17:36:58+00:00","mainEntityOfPage":{"@id":"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/"},"wordCount":1319,"commentCount":28,"image":{"@id":"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2010\/11\/driver-race-car_thumb.jpg","articleSection":["Best Practices","Design","Language"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/","url":"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/","name":"Back to Basics: What is an Interface?","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/#primaryimage"},"image":{"@id":"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2010\/11\/driver-race-car_thumb.jpg","datePublished":"2010-11-03T03:25:44+00:00","dateModified":"2018-01-12T17:36:58+00:00","author":{"@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/1abc70edfb189184827740310672de67"},"description":"One of the basics I feel we really need to get back to is the use and understanding of the value of interfaces. Interfaces are trying to solve a very specific problem by allowing us to interact with objects based on what they do, not how they do it.","breadcrumb":{"@id":"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/#primaryimage","url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2010\/11\/driver-race-car_thumb.jpg","contentUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2010\/11\/driver-race-car_thumb.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/simpleprogrammer.com\/back-to-basics-what-is-an-interface\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/simpleprogrammer.com\/"},{"@type":"ListItem","position":2,"name":"What is an Interface?"}]},{"@type":"WebSite","@id":"https:\/\/simpleprogrammer.com\/#website","url":"https:\/\/simpleprogrammer.com\/","name":"Simple Programmer","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/simpleprogrammer.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/1abc70edfb189184827740310672de67","name":"John Sonmez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g","caption":"John Sonmez"},"url":"https:\/\/simpleprogrammer.com\/author\/jsonmez\/"}]}},"_links":{"self":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts\/1152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/comments?post=1152"}],"version-history":[{"count":0,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts\/1152\/revisions"}],"wp:attachment":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/media?parent=1152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/categories?post=1152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/tags?post=1152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}