{"id":2100,"date":"2020-10-07T10:56:55","date_gmt":"2020-10-07T08:56:55","guid":{"rendered":"http:\/\/web.evertop.pl\/understanding-solid-principles-liskov-substitution\/"},"modified":"2021-06-17T12:52:09","modified_gmt":"2021-06-17T10:52:09","slug":"understanding-solid-principles-liskov-substitution","status":"publish","type":"post","link":"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/","title":{"rendered":"SOLID: Liskov Substitution Principle (LSP)"},"content":{"rendered":"<div id=\"single-content-wrapper\">\n<p>The principle relates to two main aspects of object-oriented programming. First of all, it highlights the importance of correlation between the classes with the same parent. Secondly, it helps to understand correctly the essence of object-oriented programming and virtual mechanisms, which support the process.<\/p>\n<h2>That one famous statement<\/h2>\n<p>Everything starts with that famous statement by Barbara Liskov:<\/p>\n<blockquote class=\"wp-block-quote\"><p><em>Subtype Requirement Let F(x) be a property provable about objects x of type T. Then F(y) should be true for objects y of type S where S is a subtype of T.<\/em><\/p><\/blockquote>\n<p>In short, the method presented by the basic type indicator, should work correctly on the object even if the object is of the derived type.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-4452 size-large\" src=\"https:\/\/www.evertop.pl\/wp-content\/uploads\/2020\/10\/developing-programmer-development-website-design-coding-technologies-2-1024x683.jpg\" alt=\"Developing programmer Development Website design and coding technologies working in software company office\" width=\"640\" height=\"427\" srcset=\"https:\/\/www.evertop.pl\/wp-content\/uploads\/2020\/10\/developing-programmer-development-website-design-coding-technologies-2-1024x683.jpg 1024w, https:\/\/www.evertop.pl\/wp-content\/uploads\/2020\/10\/developing-programmer-development-website-design-coding-technologies-2-300x200.jpg 300w, https:\/\/www.evertop.pl\/wp-content\/uploads\/2020\/10\/developing-programmer-development-website-design-coding-technologies-2-768x512.jpg 768w, https:\/\/www.evertop.pl\/wp-content\/uploads\/2020\/10\/developing-programmer-development-website-design-coding-technologies-2-1536x1024.jpg 1536w, https:\/\/www.evertop.pl\/wp-content\/uploads\/2020\/10\/developing-programmer-development-website-design-coding-technologies-2-2048x1365.jpg 2048w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<h2>Breaching the principle<\/h2>\n<p>The main breach of the above principle usually violates OCP principle at the same time \u2013 one type of indicator needs to be coded with the understanding of the other type of indicator. And it will have to know about the subsequent type of indicator during the system extension.<\/p>\n<p>Let\u2019s take another look at the class layout from the previous article about OCP.<\/p>\n<div class=\"wp-block-spacer\" aria-hidden=\"true\"><\/div>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img class=\"wp-image-2966\" src=\"https:\/\/www.web.evertop.pl\/wp-content\/uploads\/lsp-artykul.png\" sizes=\"(max-width: 486px) 100vw, 486px\" srcset=\"https:\/\/www.web.evertop.pl\/wp-content\/uploads\/lsp-artykul.png 486w, https:\/\/www.web.evertop.pl\/wp-content\/uploads\/lsp-artykul-300x136.png 300w\" alt=\"\" \/><\/figure>\n<\/div>\n<div class=\"wp-block-spacer\" aria-hidden=\"true\"><\/div>\n<p>With the collection of different objects deriving from\u00a0<strong><em>PayCalculator<\/em><\/strong>, the Pay calculation with breach of LSP would look as follows: we would need to calculate the commission rate for each employee before calculating their salary (for example), and in the case of drivers, we would need additionally to re-calculate the kilometres they did in Germany, as it is crucial to calculate salary at no lower rate than at the minimum rate used in Germany.<\/p>\n<p>In our example, the system for calculating the salary for all employees that would breach the LSP principle would have the following code:<\/p>\n<div class=\"wp-block-spacer\" aria-hidden=\"true\"><\/div>\n<pre class=\"wp-block-code\"><code>public class PayCalculator\r\n{\r\n    public void CalculatePay() { }\r\n}\r\n\r\npublic class TraderPayCalculator : PayCalculator\r\n{\r\n    public void CalculatePay() { }\r\n    public void CalculateCommissionThreshold() { }\r\n\r\n}\r\n\r\npublic class DriverPayCalculator : PayCalculator\r\n{\r\n    public void CalculatePay() { }\r\n    public void GermanWageRate() { }\r\n}\r\n\r\npublic class B2BPayCalculator : PayCalculator\r\n{\r\n    public void CalculatePay() { }\r\n}\r\n\r\nforeach (var employeeCalculator in employeeCalculatorList)\r\n{\r\n    if (employeeCalculator is TraderPayCalculator)\r\n        (employeeCalculator as TraderPayCalculator).CalculateCommissionThreshold();\r\n    else if (employeeCalculator is DriverPayCalculator)\r\n        (employeeCalculator as DriverPayCalculator).GermanWageRate();\r\n\r\n    employeeCalculator.CalculatePay();\r\n}<\/code><\/pre>\n<div class=\"wp-block-spacer\" aria-hidden=\"true\"><\/div>\n<p>In such a case when using the basic object type, we can\u2019t entirely use the functions which are designed for specific implementations of derived objects types. We cannot substitute the basic object type with the derived types. \u00a0In .NET environment the above code would additionally generate a very serious error. The conjectural methods are not virtual. Therefore, the CalculatePay Method, from PayCalculator will be activated every single time. Only marking the method in the basic class as\u00a0<strong><em>virtual<\/em><\/strong>, and in the derived classes as\u00a0<strong><em>override\u00a0<\/em><\/strong>will give the expected result.<\/p>\n<h2>The Amendment<\/h2>\n<p>The correct implantation should enable the use of code in the following way:<\/p>\n<div class=\"wp-block-spacer\" aria-hidden=\"true\"><\/div>\n<pre class=\"wp-block-code\"><code>foreach (var employeeCalculator in employeeCalculatorList)\r\n{\r\n    employeeCalculator.CalculatePay();\r\n}<\/code><\/pre>\n<div class=\"wp-block-spacer\" aria-hidden=\"true\"><\/div>\n<p>In this case, the derived class can be replaced by the basic class. Besides, the basic class does not need to know anything about its derived classes. When extending the system we don\u2019t need to modify the code, which uses the basic class.<\/p>\n<h2>The objectivity in the real world<\/h2>\n<p>There is one more thing worth mentioning in the object- oriented programming, which relates to the substitution principle. The best way to illustrate it is to use the square and rectangle symbols. From math classes we know that the square is a type of rectangular \u2013 with the equal height and width. In the object-oriented programming the real world observation and the attempt to implement the class based on that observation, may lead to unexpected situations\/behaviours. Let\u2019s imagine we have a square and rectangle class:<\/p>\n<div class=\"wp-block-spacer\" aria-hidden=\"true\"><\/div>\n<pre class=\"wp-block-code\"><code>public class Rectangle\r\n{\r\n    public virtual int Height { get; set; }\r\n    public virtual int Width { get; set; }\r\n\r\n    public int Perimeter () =&gt; 2 * (Height + Width);\r\n    public int Surface() =&gt; Height * Width;\r\n}\r\n\r\npublic class Square : Rectangle\r\n{\r\n\r\n}<\/code><\/pre>\n<div class=\"wp-block-spacer\" aria-hidden=\"true\"><\/div>\n<p>What should be the correct behaviour in the case of the following code:<\/p>\n<div class=\"wp-block-spacer\" aria-hidden=\"true\"><\/div>\n<pre class=\"wp-block-code\"><code>public void Test()\r\n{\r\n    Rectangle square = new Square();\r\n\r\n    square.Height = 5;\r\n    square.Width = 7;\r\n    Console.WriteLine(square.Perimeter());\r\n} <\/code><\/pre>\n<div class=\"wp-block-spacer\" aria-hidden=\"true\"><\/div>\n<p>Even if the implementation of the\u00a0<strong><em>Square<\/em><\/strong>\u00a0class will be changing its height while attributing the width or changing its width while attributing the height, will the above code be clear and readable? In this particular case the natural correlation between the height and the width of the square will not be taken into account during the inheritance process. The classes have their individual features but the same functionality to calculate the surface area and the perimeter. Look at the picture below:<\/p>\n<div class=\"wp-block-spacer\" aria-hidden=\"true\"><\/div>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img class=\"wp-image-2967\" src=\"https:\/\/www.web.evertop.pl\/wp-content\/uploads\/lsp-artykul2.png\" alt=\"\" \/><\/figure>\n<\/div>\n<div class=\"wp-block-spacer\" aria-hidden=\"true\"><\/div>\n<h2>A few words about the architecture<\/h2>\n<p>Discussed principle points the direction towards which the dependencies in IT systems should be built. Base element, which is a specific interface for derivative elements cannot be dependent on them. Each time when the base element has to \u201eknow\u201d the details of implementing derivative elements in the system this rule will be violated and its development will be difficult and error prone. This principle works both in case of base and derivative classes as well as in case of any other elements of the system. Let\u2019s imagine the situation in which, for instance, Google API depends on the implementation of the systems that depend on it.<\/p>\n<h2>The summary<\/h2>\n<p>The substitution principle explains that when the class correlations are programmed, the basic classes won\u2019t need to know anything about their derived classes, especially when they work on the objects of the derived classes. This principle helps to understand the importance of the virtual methods, and always works with the methods related to the object type, stored by the object, not by the object indicators. When programming the hierarchy of the class in the system we should be aware of the risks during the real world implementation into classes, as the code that is created might be unreadable and counterintuitive.<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Other SOLID principles:<br \/>\n<a href=\"http:\/\/web.evertop.pl\/understanding-solid-principles-single-responsibility\/\">Single Responsibility<\/a><br \/>\n<a href=\"http:\/\/web.evertop.pl\/understanding-solid-principles-open-closed\/\">Open-Closed<\/a><br \/>\n<a href=\"http:\/\/web.evertop.pl\/understanding-solid-principles-interface-segregation\/\">Interface Segregation<\/a><br \/>\n<a href=\"http:\/\/web.evertop.pl\/understanding-solid-principles-dependency-inversion\/\">Dependency Inversion<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The principle relates to two main aspects of object-oriented programming. First of all, it highlights the importance of correlation between the classes with the same parent. Secondly, it helps to understand correctly the essence of object-oriented programming and virtual mechanisms, which support the process. That one famous statement Everything starts with that famous statement by [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":4451,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[20,21,22],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SOLID: Liskov Substitution Principle (LSP) - Evertop<\/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:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SOLID: Liskov Substitution Principle (LSP) - Evertop\" \/>\n<meta property=\"og:description\" content=\"The principle relates to two main aspects of object-oriented programming. First of all, it highlights the importance of correlation between the classes with the same parent. Secondly, it helps to understand correctly the essence of object-oriented programming and virtual mechanisms, which support the process. That one famous statement Everything starts with that famous statement by [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/\" \/>\n<meta property=\"og:site_name\" content=\"Evertop\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/EvertopPoland\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-07T08:56:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-17T10:52:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.evertop.pl\/wp-content\/uploads\/2020\/10\/grafiki_blog_4_Obszar-roboczy-1-kopia-9-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1601\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pawe\u0142 Szymura\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.evertop.pl\/#organization\",\"name\":\"Evertop\",\"url\":\"https:\/\/www.evertop.pl\/\",\"sameAs\":[\"https:\/\/www.facebook.com\/EvertopPoland\/\",\"https:\/\/www.linkedin.com\/company\/evertop-software-development\/\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.evertop.pl\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.evertop.pl\/wp-content\/uploads\/2021\/04\/logo_new.png\",\"contentUrl\":\"https:\/\/www.evertop.pl\/wp-content\/uploads\/2021\/04\/logo_new.png\",\"width\":582,\"height\":114,\"caption\":\"Evertop\"},\"image\":{\"@id\":\"https:\/\/www.evertop.pl\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.evertop.pl\/#website\",\"url\":\"https:\/\/www.evertop.pl\/\",\"name\":\"Evertop\",\"description\":\"we code the future\",\"publisher\":{\"@id\":\"https:\/\/www.evertop.pl\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.evertop.pl\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.evertop.pl\/wp-content\/uploads\/2020\/10\/grafiki_blog_4_Obszar-roboczy-1-kopia-9-scaled.jpg\",\"contentUrl\":\"https:\/\/www.evertop.pl\/wp-content\/uploads\/2020\/10\/grafiki_blog_4_Obszar-roboczy-1-kopia-9-scaled.jpg\",\"width\":2560,\"height\":1601},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#webpage\",\"url\":\"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/\",\"name\":\"SOLID: Liskov Substitution Principle (LSP) - Evertop\",\"isPartOf\":{\"@id\":\"https:\/\/www.evertop.pl\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#primaryimage\"},\"datePublished\":\"2020-10-07T08:56:55+00:00\",\"dateModified\":\"2021-06-17T10:52:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Strona g\\u0142\\u00f3wna\",\"item\":\"https:\/\/www.evertop.pl\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SOLID: Liskov Substitution Principle (LSP)\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.evertop.pl\/#\/schema\/person\/67da6133f965ef4876b54ed5cd0509ed\"},\"headline\":\"SOLID: Liskov Substitution Principle (LSP)\",\"datePublished\":\"2020-10-07T08:56:55+00:00\",\"dateModified\":\"2021-06-17T10:52:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#webpage\"},\"wordCount\":848,\"publisher\":{\"@id\":\"https:\/\/www.evertop.pl\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.evertop.pl\/wp-content\/uploads\/2020\/10\/grafiki_blog_4_Obszar-roboczy-1-kopia-9-scaled.jpg\",\"keywords\":[\"programming tips\",\"self development\",\"SOLID\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.evertop.pl\/#\/schema\/person\/67da6133f965ef4876b54ed5cd0509ed\",\"name\":\"Pawe\\u0142 Szymura\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.evertop.pl\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3c1282144fed3331a59535f2439a6db1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3c1282144fed3331a59535f2439a6db1?s=96&d=mm&r=g\",\"caption\":\"Pawe\\u0142 Szymura\"},\"url\":\"https:\/\/www.evertop.pl\/en\/author\/pszymura\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SOLID: Liskov Substitution Principle (LSP) - Evertop","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:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/","og_locale":"en_US","og_type":"article","og_title":"SOLID: Liskov Substitution Principle (LSP) - Evertop","og_description":"The principle relates to two main aspects of object-oriented programming. First of all, it highlights the importance of correlation between the classes with the same parent. Secondly, it helps to understand correctly the essence of object-oriented programming and virtual mechanisms, which support the process. That one famous statement Everything starts with that famous statement by [&hellip;]","og_url":"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/","og_site_name":"Evertop","article_publisher":"https:\/\/www.facebook.com\/EvertopPoland\/","article_published_time":"2020-10-07T08:56:55+00:00","article_modified_time":"2021-06-17T10:52:09+00:00","og_image":[{"width":2560,"height":1601,"url":"https:\/\/www.evertop.pl\/wp-content\/uploads\/2020\/10\/grafiki_blog_4_Obszar-roboczy-1-kopia-9-scaled.jpg","path":"\/home\/evertop\/web-evertop\/wp-content\/uploads\/2020\/10\/grafiki_blog_4_Obszar-roboczy-1-kopia-9-scaled.jpg","size":"full","id":4451,"alt":"","pixels":4098560,"type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pawe\u0142 Szymura","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/www.evertop.pl\/#organization","name":"Evertop","url":"https:\/\/www.evertop.pl\/","sameAs":["https:\/\/www.facebook.com\/EvertopPoland\/","https:\/\/www.linkedin.com\/company\/evertop-software-development\/"],"logo":{"@type":"ImageObject","@id":"https:\/\/www.evertop.pl\/#logo","inLanguage":"en-US","url":"https:\/\/www.evertop.pl\/wp-content\/uploads\/2021\/04\/logo_new.png","contentUrl":"https:\/\/www.evertop.pl\/wp-content\/uploads\/2021\/04\/logo_new.png","width":582,"height":114,"caption":"Evertop"},"image":{"@id":"https:\/\/www.evertop.pl\/#logo"}},{"@type":"WebSite","@id":"https:\/\/www.evertop.pl\/#website","url":"https:\/\/www.evertop.pl\/","name":"Evertop","description":"we code the future","publisher":{"@id":"https:\/\/www.evertop.pl\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.evertop.pl\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#primaryimage","inLanguage":"en-US","url":"https:\/\/www.evertop.pl\/wp-content\/uploads\/2020\/10\/grafiki_blog_4_Obszar-roboczy-1-kopia-9-scaled.jpg","contentUrl":"https:\/\/www.evertop.pl\/wp-content\/uploads\/2020\/10\/grafiki_blog_4_Obszar-roboczy-1-kopia-9-scaled.jpg","width":2560,"height":1601},{"@type":"WebPage","@id":"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#webpage","url":"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/","name":"SOLID: Liskov Substitution Principle (LSP) - Evertop","isPartOf":{"@id":"https:\/\/www.evertop.pl\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#primaryimage"},"datePublished":"2020-10-07T08:56:55+00:00","dateModified":"2021-06-17T10:52:09+00:00","breadcrumb":{"@id":"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Strona g\u0142\u00f3wna","item":"https:\/\/www.evertop.pl\/en\/"},{"@type":"ListItem","position":2,"name":"SOLID: Liskov Substitution Principle (LSP)"}]},{"@type":"Article","@id":"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#article","isPartOf":{"@id":"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#webpage"},"author":{"@id":"https:\/\/www.evertop.pl\/#\/schema\/person\/67da6133f965ef4876b54ed5cd0509ed"},"headline":"SOLID: Liskov Substitution Principle (LSP)","datePublished":"2020-10-07T08:56:55+00:00","dateModified":"2021-06-17T10:52:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#webpage"},"wordCount":848,"publisher":{"@id":"https:\/\/www.evertop.pl\/#organization"},"image":{"@id":"https:\/\/www.evertop.pl\/en\/understanding-solid-principles-liskov-substitution\/#primaryimage"},"thumbnailUrl":"https:\/\/www.evertop.pl\/wp-content\/uploads\/2020\/10\/grafiki_blog_4_Obszar-roboczy-1-kopia-9-scaled.jpg","keywords":["programming tips","self development","SOLID"],"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.evertop.pl\/#\/schema\/person\/67da6133f965ef4876b54ed5cd0509ed","name":"Pawe\u0142 Szymura","image":{"@type":"ImageObject","@id":"https:\/\/www.evertop.pl\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/3c1282144fed3331a59535f2439a6db1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3c1282144fed3331a59535f2439a6db1?s=96&d=mm&r=g","caption":"Pawe\u0142 Szymura"},"url":"https:\/\/www.evertop.pl\/en\/author\/pszymura\/"}]}},"_links":{"self":[{"href":"https:\/\/www.evertop.pl\/en\/wp-json\/wp\/v2\/posts\/2100"}],"collection":[{"href":"https:\/\/www.evertop.pl\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.evertop.pl\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.evertop.pl\/en\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.evertop.pl\/en\/wp-json\/wp\/v2\/comments?post=2100"}],"version-history":[{"count":9,"href":"https:\/\/www.evertop.pl\/en\/wp-json\/wp\/v2\/posts\/2100\/revisions"}],"predecessor-version":[{"id":4761,"href":"https:\/\/www.evertop.pl\/en\/wp-json\/wp\/v2\/posts\/2100\/revisions\/4761"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.evertop.pl\/en\/wp-json\/wp\/v2\/media\/4451"}],"wp:attachment":[{"href":"https:\/\/www.evertop.pl\/en\/wp-json\/wp\/v2\/media?parent=2100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.evertop.pl\/en\/wp-json\/wp\/v2\/categories?post=2100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.evertop.pl\/en\/wp-json\/wp\/v2\/tags?post=2100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}