{"id":108,"date":"2020-12-16T12:14:43","date_gmt":"2020-12-16T12:14:43","guid":{"rendered":"https:\/\/manishshrivastava.com\/blog\/?p=108"},"modified":"2020-12-16T18:14:59","modified_gmt":"2020-12-16T18:14:59","slug":"solid-principle-in-rails","status":"publish","type":"post","link":"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/","title":{"rendered":"SOLID Principle in Ruby on Rails"},"content":{"rendered":"\n<p><strong>SOLID<\/strong> Stands for: <\/p>\n\n\n\n<ul><li><strong>S<\/strong>ingle responsibility principle<\/li><li><strong>O<\/strong>pen\/closed principle<\/li><li><strong>L<\/strong>iskov substitution principle<\/li><li><strong>I<\/strong>nterface segregation principle<\/li><li><strong>D<\/strong>ependency inversion principle<\/li><\/ul>\n\n\n\n<p>The acronym stands for principles to help software engineers to create \/ write maintainable source code for long-term that use an OOPS language.<\/p>\n\n\n\n<p><strong>Single responsibility principle: <\/strong>Focus on One thing in a Class Seprately.<\/p>\n\n\n\n<p><strong>Open\/closed principle:<\/strong> Class should be open for extension and closed for modification.<\/p>\n\n\n\n<p><strong>&nbsp;Liskov substitution principle: <\/strong>The derived class must be capable of being substituted by its base class.<\/p>\n\n\n\n<p><strong>Interface Segregation principle:<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/drive.google.com\/file\/d\/0BwhCYaYDn8EgOTViYjJhYzMtMzYxMC00MzFjLWJjMzYtOGJiMDc5N2JkYmJi\/view\">Interface Segregation Principle (1996)<\/a><\/p>\n\n\n\n<p><strong>Dependency Inversion principle (DIP): <\/strong>Now a days used with Docker, Docker composer.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/bibendi\/dip\">The Dependency Inversion Principle<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SOLID Stands for: Single responsibility principle Open\/closed principle Liskov substitution principle Interface segregation principle Dependency inversion principle The acronym stands for principles to help software engineers to create \/ write maintainable source code for long-term that use an OOPS language. Single responsibility principle: Focus on One thing in a Class Seprately. Open\/closed principle: Class should &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;SOLID Principle in Ruby on Rails&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[31,23],"tags":[26,17,32],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SOLID Principle in Ruby on Rails - Manish Blog<\/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:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SOLID Principle in Ruby on Rails - Manish Blog\" \/>\n<meta property=\"og:description\" content=\"SOLID Stands for: Single responsibility principle Open\/closed principle Liskov substitution principle Interface segregation principle Dependency inversion principle The acronym stands for principles to help software engineers to create \/ write maintainable source code for long-term that use an OOPS language. Single responsibility principle: Focus on One thing in a Class Seprately. Open\/closed principle: Class should &hellip; Continue reading &quot;SOLID Principle in Ruby on Rails&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/\" \/>\n<meta property=\"og:site_name\" content=\"Manish Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-16T12:14:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-16T18:14:59+00:00\" \/>\n<meta name=\"author\" content=\"manishshrivastava\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"manishshrivastava\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/\"},\"author\":{\"name\":\"manishshrivastava\",\"@id\":\"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/e4d02d0fe4a05267401de130fac850f0\"},\"headline\":\"SOLID Principle in Ruby on Rails\",\"datePublished\":\"2020-12-16T12:14:43+00:00\",\"dateModified\":\"2020-12-16T18:14:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/\"},\"wordCount\":109,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/19d0df1c38b86606412b5c821e67e67e\"},\"keywords\":[\"programming in ruby\",\"ruby\",\"tips and tricks\"],\"articleSection\":[\"concept\",\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/\",\"url\":\"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/\",\"name\":\"SOLID Principle in Ruby on Rails - Manish Blog\",\"isPartOf\":{\"@id\":\"https:\/\/manishshrivastava.com\/blog\/#website\"},\"datePublished\":\"2020-12-16T12:14:43+00:00\",\"dateModified\":\"2020-12-16T18:14:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/manishshrivastava.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Programming\",\"item\":\"https:\/\/manishshrivastava.com\/blog\/category\/programming\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"SOLID Principle in Ruby on Rails\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/manishshrivastava.com\/blog\/#website\",\"url\":\"https:\/\/manishshrivastava.com\/blog\/\",\"name\":\"Manish Blog\",\"description\":\"Rubyist, Realist, Pragmatist, and Believer\",\"publisher\":{\"@id\":\"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/19d0df1c38b86606412b5c821e67e67e\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/manishshrivastava.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/19d0df1c38b86606412b5c821e67e67e\",\"name\":\"manish shrivastava\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8d35275f95d1cd3202c89c1693336453?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8d35275f95d1cd3202c89c1693336453?s=96&d=mm&r=g\",\"caption\":\"manish shrivastava\"},\"logo\":{\"@id\":\"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/99interview.com\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/e4d02d0fe4a05267401de130fac850f0\",\"name\":\"manishshrivastava\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ba8ddd15351cbf6b58b3d8e16ce94b3b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ba8ddd15351cbf6b58b3d8e16ce94b3b?s=96&d=mm&r=g\",\"caption\":\"manishshrivastava\"},\"description\":\"Holds 15+ years of experience as a Software Development Expert. His vision is to share knowledge related to How Software can add value to anyone's life. Manish is a Software Developer and Open source contributor. He is an experienced developer with 15+ years of experience in creating awesome web and app projects based on specific requirements using Ruby, React, and sometimes python. He says, He is a Rubyist, Realist, Pragmatist, and Believer.\",\"sameAs\":[\"https:\/\/manishshrivastava.com\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SOLID Principle in Ruby on Rails - Manish Blog","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:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/","og_locale":"en_US","og_type":"article","og_title":"SOLID Principle in Ruby on Rails - Manish Blog","og_description":"SOLID Stands for: Single responsibility principle Open\/closed principle Liskov substitution principle Interface segregation principle Dependency inversion principle The acronym stands for principles to help software engineers to create \/ write maintainable source code for long-term that use an OOPS language. Single responsibility principle: Focus on One thing in a Class Seprately. Open\/closed principle: Class should &hellip; Continue reading \"SOLID Principle in Ruby on Rails\"","og_url":"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/","og_site_name":"Manish Blog","article_published_time":"2020-12-16T12:14:43+00:00","article_modified_time":"2020-12-16T18:14:59+00:00","author":"manishshrivastava","twitter_card":"summary_large_image","twitter_misc":{"Written by":"manishshrivastava"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/#article","isPartOf":{"@id":"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/"},"author":{"name":"manishshrivastava","@id":"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/e4d02d0fe4a05267401de130fac850f0"},"headline":"SOLID Principle in Ruby on Rails","datePublished":"2020-12-16T12:14:43+00:00","dateModified":"2020-12-16T18:14:59+00:00","mainEntityOfPage":{"@id":"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/"},"wordCount":109,"commentCount":0,"publisher":{"@id":"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/19d0df1c38b86606412b5c821e67e67e"},"keywords":["programming in ruby","ruby","tips and tricks"],"articleSection":["concept","Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/","url":"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/","name":"SOLID Principle in Ruby on Rails - Manish Blog","isPartOf":{"@id":"https:\/\/manishshrivastava.com\/blog\/#website"},"datePublished":"2020-12-16T12:14:43+00:00","dateModified":"2020-12-16T18:14:59+00:00","breadcrumb":{"@id":"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/manishshrivastava.com\/blog\/solid-principle-in-rails\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/manishshrivastava.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Programming","item":"https:\/\/manishshrivastava.com\/blog\/category\/programming\/"},{"@type":"ListItem","position":3,"name":"SOLID Principle in Ruby on Rails"}]},{"@type":"WebSite","@id":"https:\/\/manishshrivastava.com\/blog\/#website","url":"https:\/\/manishshrivastava.com\/blog\/","name":"Manish Blog","description":"Rubyist, Realist, Pragmatist, and Believer","publisher":{"@id":"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/19d0df1c38b86606412b5c821e67e67e"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/manishshrivastava.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/19d0df1c38b86606412b5c821e67e67e","name":"manish shrivastava","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8d35275f95d1cd3202c89c1693336453?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8d35275f95d1cd3202c89c1693336453?s=96&d=mm&r=g","caption":"manish shrivastava"},"logo":{"@id":"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/99interview.com"]},{"@type":"Person","@id":"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/e4d02d0fe4a05267401de130fac850f0","name":"manishshrivastava","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/manishshrivastava.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ba8ddd15351cbf6b58b3d8e16ce94b3b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ba8ddd15351cbf6b58b3d8e16ce94b3b?s=96&d=mm&r=g","caption":"manishshrivastava"},"description":"Holds 15+ years of experience as a Software Development Expert. His vision is to share knowledge related to How Software can add value to anyone's life. Manish is a Software Developer and Open source contributor. He is an experienced developer with 15+ years of experience in creating awesome web and app projects based on specific requirements using Ruby, React, and sometimes python. He says, He is a Rubyist, Realist, Pragmatist, and Believer.","sameAs":["https:\/\/manishshrivastava.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/manishshrivastava.com\/blog\/wp-json\/wp\/v2\/posts\/108"}],"collection":[{"href":"https:\/\/manishshrivastava.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/manishshrivastava.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/manishshrivastava.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/manishshrivastava.com\/blog\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":4,"href":"https:\/\/manishshrivastava.com\/blog\/wp-json\/wp\/v2\/posts\/108\/revisions"}],"predecessor-version":[{"id":112,"href":"https:\/\/manishshrivastava.com\/blog\/wp-json\/wp\/v2\/posts\/108\/revisions\/112"}],"wp:attachment":[{"href":"https:\/\/manishshrivastava.com\/blog\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/manishshrivastava.com\/blog\/wp-json\/wp\/v2\/categories?post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/manishshrivastava.com\/blog\/wp-json\/wp\/v2\/tags?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}