{"id":13795,"date":"2015-06-08T11:00:00","date_gmt":"2015-06-08T15:00:00","guid":{"rendered":"https:\/\/simpleprogrammer.com\/?p=13795"},"modified":"2018-01-23T13:24:21","modified_gmt":"2018-01-23T18:24:21","slug":"design-patterns-simplified-the-bridge-pattern","status":"publish","type":"post","link":"https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/","title":{"rendered":"Bridge Pattern"},"content":{"rendered":"<p>Let me ask you a question?\\n\\n<strong>Do you really understand design patterns<\/strong>\u2014you know, the ones in that old <a href=\"http:\/\/amzn.to\/1KN6CYc\" target=\"_blank\">Gang of Four book<\/a>?\\n\\nPerhaps you aren\u2019t even really familiar with the term \u201cdesign patterns.\u201d It\u2019s Ok, you are not alone. Design patterns are simply formal names given to common patterns that seem to emerge from solving various architectural problems in software development.\\n\\nThe term \u201cdesign pattern\u201d became popular <a href=\"http:\/\/amzn.to\/1KN6CYc\" target=\"_blank\">after the book, by the same name<\/a> was published was back in 1994. This landmark book is now affectionately referred to as the \u201cGang of Four\u201d book, after the 4 authors who co-wrote the book: Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides.\\n\\nAs good as the book is, it does have one major short-coming. It\u2019s a bit difficult to understand.\\n\\n<img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-13810\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/Depositphotos_5574678_m-1-709x1024.jpg\" alt=\"\" width=\"350\" height=\"506\" srcset=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/Depositphotos_5574678_m-1-709x1024.jpg 709w, https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/Depositphotos_5574678_m-1-208x300.jpg 208w, https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/Depositphotos_5574678_m-1-768x1109.jpg 768w, https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/Depositphotos_5574678_m-1-1063x1536.jpg 1063w, https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/Depositphotos_5574678_m-1.jpg 1177w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/>Perhaps though, you already understand design patterns, but do you really get them at a deep level? For the longest time in my career, I didn\u2019t. Sure, I understood the basics, and I knew what Singleton was, but <strong>I didn\u2019t really understand the how and why of most of the somewhat complicated design patterns.<\/strong>\\n\\nI finally decided that enough was enough and I was going to scour the internet and books to find some simple explanations and examples of the design patterns that weren\u2019t so easily explained.\\n\\nWell, after all that searching, guess what? I didn\u2019t find what I was looking for. <strong>I found plenty of explanations of design patterns, but none of them were very simple.<\/strong> I found plenty of examples of the various design patterns, but most of them were the same old tired examples that existed everywhere else.\\n\\nSo, I decided that I was going to go through all that information and come up with my own examples, over and over again until I really, deeply understood all of the design patterns. The process was long\u2014and somewhat boring\u2014but, I when I was finished <strong>I was able to confidently say that I finally really understood design patterns.<\/strong>\\n\\n<a href=\"https:\/\/simpleprogrammer.com\/ps-design-patterns\" target=\"_blank\">(I also created quite a few Pluralsight videos explaining many of the design patterns, with some real code examples. You can find those here.)<\/a>\\n\\n<\/p>\n<h2>Sharing the Knowledge<\/h2>\n<p>\\n\\nIn this series of articles, I\u2019m going to take my lessons learned from going through all of the design patterns in depth and I am going to do my very best job to assimilate all that information into what I hope will be <strong>the most clear and easily understandable explanation of each of the patterns<\/strong>, starting with the Bridge pattern.\\n\\nIn this article, I will follow this format:\\n\\n<\/p>\n<ul>\\n    <\/p>\n<li><strong>Formal definition<\/strong> of the design pattern<\/li>\n<p>\\n    <\/p>\n<li><strong>Broken down definition<\/strong> in plain English<\/li>\n<p>\\n    <\/p>\n<li>A <strong>real world example<\/strong> to let you think outside of the code<\/li>\n<p>\\n    <\/p>\n<li>An <strong>existing code-oriented example<\/strong> that would benefit from the design pattern<\/li>\n<p>\\n    <\/p>\n<li>A <strong>refactoring<\/strong> of the existing example to the pattern<\/li>\n<p>\\n    <\/p>\n<li>An <strong>explanation of the official UML diagram<\/strong> of the pattern relating it to the example<\/li>\n<p>\\n    <\/p>\n<li>When you should use the pattern<\/li>\n<p>\\n<\/ul>\n<p>\\n\\nMy hope is that by the time you read this article you will have in your mind not only a clear picture of what the Bridge pattern is and how it is implemented, but the real problem it is trying to solve and plenty of examples of where and how it can be used.\\n\\n<\/p>\n<h2>The Bridge Pattern<\/h2>\n<p>\\n\\n<img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-13808 alignright\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/bridge-pattern1-1-320x300.png\" alt=\"bridge-pattern\" width=\"320\" height=\"300\" \/>The pattern, I\u2019ll be covering in this article will be <a href=\"http:\/\/en.wikipedia.org\/wiki\/Bridge_pattern\">the bridge pattern<\/a>. This is a pattern that many developers\u2014experienced and inexperienced alike\u2014struggle with. Most developers I\u2019ve talked to can only site the over-used example of how the pattern solves the problem of multiple operating systems and drawing APIs for those operating systems. I don\u2019t know about you, but I am tired of that rarely useful example. I think we can do better.\\n\\nLet\u2019s start with the format definition, directly from the GoF book, Design Patterns.\\n\\n<em>\u201cDecouples an abstraction from its implementation so that the two can vary independently.\u201d<\/em>\\n\\nWhat the heck does that even mean? Let\u2019s break it down.\\n\\n<\/p>\n<h2>Breaking it Down<\/h2>\n<p>\\n\\nIn order to break down this definition we need to first make sure we understand what is meant by an abstraction and an implementation\u2014and <strong>it\u2019s not what you think.<\/strong>\\n\\nIn many programming languages such as C# or Java, an abstraction is thought of as an interface or an abstract class. And implementation is usually a structural implementation of that interface or a concrete class that inherits from and abstract base class.\\n\\nRemember, the GoF definition is not language specific. This mostly affects the word interface\u2014which is the most common point of confusion.\\n\\nForget about words and what they mean in specific programming languages for a minute and think about what is trying to be conveyed here instead.\\n\\nWe want to focus on the words themselves, not what they mean in a particular programming language.\\n\\nLet\u2019s start with abstraction. <strong>What is an abstraction?<\/strong>\\n\\nIt\u2019s a generalized way of looking at something that makes it so you don\u2019t have to know the details of how that thing is implemented.\\n\\n<img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-13812\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/Depositphotos_15748925_m-1-683x1024.jpg\" alt=\"\" width=\"350\" height=\"525\" srcset=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/Depositphotos_15748925_m-1-683x1024.jpg 683w, https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/Depositphotos_15748925_m-1-200x300.jpg 200w, https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/Depositphotos_15748925_m-1-768x1152.jpg 768w, https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/Depositphotos_15748925_m-1-1024x1536.jpg 1024w, https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/Depositphotos_15748925_m-1.jpg 1155w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/>A car steering wheel is an abstraction on top of a car. The car steering wheel abstracts away what is really going on to make a car change direction.\\n\\nWe don\u2019t really care how it does it. In fact, the abstraction of the car steering wheel protects us from having to worry about all the details\u2014especially if those details might change in the future.\\n\\nGood news, in defining an abstraction, we also defined an implementation.\\n\\nAn implementation is <strong>just a realization of that abstraction.<\/strong> It\u2019s what\u2019s going on under the hood. It\u2019s taking an abstraction and making it real.\\n\\nNow, normally an abstraction and its implementation are coupled.\\n\\nA car might have a car steering wheel abstraction, but the implementation of that car steering wheel is tied directly to that abstraction.\\n\\nA car might utilize the car steering wheel abstraction, but it has a specific implementation of that abstraction and that implementation is directly tried to that abstraction.\\n\\n<img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-13796 aligncenter\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/diagram1.png\" alt=\"diagram1\" width=\"467\" height=\"230\" \/>\\n\\nBut what if you had multiple kinds of vehicles that you wanted to be able to utilize the car steering wheel abstraction?\\n\\nWhat if you had boats and airplanes that needed to utilize a steering wheel?\\n\\nA car has a much different implementation of steering than a boat or an airplane, but all of those vehicles could have a similar looking steering wheel that all operate in a similar fashion.\\n\\nYou could put a car steering wheel in each of these vehicles, but if the abstraction of the car steering wheel is directly tied to the specific implementation for a car, it\u2019s not going to work out very well. <strong>Steering a car might look the same as steering an airplane, but they work very differently.<\/strong>\\n\\nWhat you need to do is to be able to decouple the abstraction of the steering wheel from its specific implementation for steering a car. You need an abstraction of an abstraction. You need to be able to abstract the already abstract idea of a car steering wheel into a more generalized abstraction of a vehicle steering wheel.\\n\\nThat is where the pattern comes in.\\n\\n<strong>The pattern allows us to create a double abstraction\u2014two layers of abstraction.<\/strong>\\n\\nFirst we have the abstraction of the interface of the steering system for a car, represented by the car steering wheel.\\n\\nBut, then we take that abstraction one step further. We decouple the specific implementation of steering a car from the abstraction of a car steering wheel and create a higher level abstraction, a vehicle steering wheel.\\n\\nNow, we can have multiple implementations of this simplified idea, or abstraction, of a vehicle steering wheel.\\n\\nThe vehicle steering wheel becomes our high level abstraction and the car steering wheel becomes the implementor of that abstraction. We can now create other implementations of the abstraction. We can create boat and airplane steering wheels, each with their own specific implementations.\\n\\n<img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-13797 aligncenter\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/diagram2.png\" alt=\"diagram2\" width=\"976\" height=\"732\" \/>\\n\\nNow we can create different steering wheels for each type of vehicle that aren\u2019t coupled to a specific steering system. The pattern makes it so that the abstraction of a steering wheel is decoupled from the implementation of the specific steering systems, like using turning an axle or raising or lowering a wing-flap.\\n\\n(I also wanted to mention another good book that explains design patterns in a fairly simple way. Check out <a href=\"http:\/\/amzn.to\/1JvMjl0\">Head First Design Patterns<\/a>. It&#8217;s one of the books I recommend in my <a href=\"https:\/\/simpleprogrammer.com\/2015\/03\/23\/the-ultimate-list-of-programming-books\/\" target=\"_blank\">Ultimate List of Programming Books<\/a>.)\\n\\n<\/p>\n<h2>A Mode Code-Specific Example<\/h2>\n<p>\\n\\nNow, that we understand the pattern at a high level, let\u2019s take what we learned and apply it to a software development domain.\\n\\nSuppose you are creating a web application framework that will allow you to create different kinds of web applications.\\n\\nPerhaps you want to be able to use the framework to create blog, news sites, stores and other kinds of web applications.\\n\\nYou could define a base web application class that could be the parent of all the different kinds of web applications, and everything would be fine until you decided to introduce the concept of themes.\\n\\n<img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-13798 aligncenter\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/diagram3.png\" alt=\"diagram3\" width=\"228\" height=\"389\" \/>\\n\\nImagine that you wanted to be able to create a different themes for you blog type of web application.\\n\\nYou create a few different themes for your blog application. Perhaps you have a light theme and a dark theme.\\n\\nYou end up further sub-classing the blog type of web application so that you have blog-light and blog-dark, all is fine until you realize that you want to be able to have a light and dark theme for a news site\u2014oh, and also for a store application.\\n\\n<strong>Without the bridge pattern, you\u2019d have to follow the same pattern of creating a bunch of different classes for each combination of web application type and theme.<\/strong>\\n\\nSo, you might have store-light and store-dark, and news-site-light and news-site-dark.\\n\\nThis could get out of hand really fast\u2014especially if you decided to introduce a third theme.\\n\\n<img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-13799 aligncenter\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/diagram4.png\" alt=\"diagram4\" width=\"368\" height=\"380\" \/>\\n\\n<\/p>\n<h2>Bridge pattern to the rescue.<\/h2>\n<p>\\n\\nAny time you have two inheritance hierarchies in your code, you can simplify that code by utilizing this design pattern.\\n\\nInstead of having specific classes that are a combination of a web application type plus a theme, you make your base web application type utilize a theme interface that can specific implementations of the different kinds of themes.\\n\\nSo, the base web application wouldn\u2019t need to know about the differences between a dark or a light theme, but instead it would utilize a generic, abstract theme interface and you could create a light and a dark implementation of that interface.\\n\\nThen, your specific implementations of web applications, like blog, new sites and stores could be set to use any of the themes you create, because they access the functionality of the theme through a common theme interface.\\n\\n<img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-13800 aligncenter\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/diagram5.png\" alt=\"diagram5\" width=\"368\" height=\"380\" \/>\\n\\nNow you can create new kinds of web applications and new kinds of themes and have any combination work together, because you have decoupled the abstraction\u2014the web application\u2014from the implementation\u2014the specific theme.\\n\\n<\/p>\n<h2>Back to the Formal Definition<\/h2>\n<p>\\n\\n<img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-13801\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/diagram6.png\" alt=\"diagram6\" width=\"468\" height=\"234\" \/>\\n\\nThis is the UML (Unified Modeling Language) that represents the formal definition of the bridge pattern. (If you aren\u2019t familiar with UML, don\u2019t worry. UML is just a way of representing relationships between different entities in a software development that uses a standard language and convention. Most UML diagrams can be understood without being an expert in UML.)\\n\\nHopefully by this point, it makes a little more sense, but let\u2019s talk about what each part is in our example.\\n\\nWe start with the abstraction. The abstraction is the \u201cweb application.\u201d The abstraction would utilize an implementor to perform some kind of function. In our case the \u201cweb application\u201d might have a function to draw an input box.\\n\\nThe implementor would be the theme base class or interface. Specific themes would be ConcreteImplementors that would implement some specific functionality, like drawing an input box.\\n\\nFinally, we would have a RefinedAbstraction, which would be any of the web application types. Those web application types, like blog, storefront, and news site, would utilize the Implementor interface without having to know what ConcreteImplementor was actually providing the implementation.\\n\\n<\/p>\n<h2>When to Use the Bridge Pattern<\/h2>\n<p>\\n\\nThe most simple example I\u2019ve ever come up with for defining when you should use the pattern was actually my answer to a StackOverflow Question asking \u201c<a href=\"http:\/\/stackoverflow.com\/questions\/319728\/when-do-you-use-the-bridge-pattern\/9406293#9406293\">When do you use the Bridge Pattern?<\/a>\u201d\\n\\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13802 size-full\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/stackoverflowquestion.png\" alt=\"stackoverflowquestion\" width=\"468\" height=\"341\" \/>\\n\\nWell, I hope you now have a deep and complete understanding of this pattern, how it works and when to use it.\\n\\n<a href=\"https:\/\/simpleprogrammer.com\/email\" target=\"_blank\">(Be sure to subscribe here and you&#8217;ll get an email update when I release a new article in the design pattern series.)<\/a>\\n\\nIf you really want to cement your knowledge, the best thing you can do right now is to come up with a few of your own examples and try implementing one or two with some very basic code.\\n\\nSometimes learning how to learn is more important than mere learning. Check out my course <a href=\"https:\/\/simpleprogrammer.com\/store\/products\/learn-anything-quickly\/\">&#8220;10 Steps to Learn Anything Quickly&#8221;<\/a> for a few tips on boosting the rate at which you learn<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let me ask you a question?\\n\\nDo you really understand design patterns\u2014you know, the ones in that old Gang of Four book?\\n\\nPerhaps you aren\u2019t even really familiar with the term \u201cdesign patterns.\u201d It\u2019s Ok, you are not alone. Design patterns are simply formal names given to common patterns that seem to emerge from solving various architectural&#8230;<\/p>\n","protected":false},"author":2,"featured_media":13806,"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":[2290,148,45348,32,141605296,31679,1883271,2260],"tags":[],"class_list":["post-13795","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-architecture","category-design","category-frameworks","category-infrastructure","category-pluralsight-2","category-process-improvement","category-productivity-2","category-web-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Bridge Pattern | Design Patterns Simplified - Simple Programmer<\/title>\n<meta name=\"description\" content=\"In this post, I\u2019ll be covering the bridge pattern. Many experienced and inexperienced developers struggle with this build pattern.\" \/>\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\/design-patterns-simplified-the-bridge-pattern\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Bridge Pattern | Design Patterns Simplified - Simple Programmer\" \/>\n<meta property=\"og:description\" content=\"In this post, I\u2019ll be covering the bridge pattern. Many experienced and inexperienced developers struggle with this build pattern.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/\" \/>\n<meta property=\"og:site_name\" content=\"Simple Programmer\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-08T15:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-23T18:24:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/bridge.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1089\" \/>\n\t<meta property=\"og:image:height\" content=\"598\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\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=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/design-patterns-simplified-the-bridge-pattern\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/design-patterns-simplified-the-bridge-pattern\\\/\"},\"author\":{\"name\":\"John Sonmez\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/1abc70edfb189184827740310672de67\"},\"headline\":\"Bridge Pattern\",\"datePublished\":\"2015-06-08T15:00:00+00:00\",\"dateModified\":\"2018-01-23T18:24:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/design-patterns-simplified-the-bridge-pattern\\\/\"},\"wordCount\":2300,\"commentCount\":23,\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/design-patterns-simplified-the-bridge-pattern\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2015\\\/06\\\/bridge.png\",\"articleSection\":[\"Architecture\",\"Design\",\"Frameworks\",\"Infrastructure\",\"Pluralsight\",\"Process Improvement\",\"Productivity\",\"Web Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/design-patterns-simplified-the-bridge-pattern\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/design-patterns-simplified-the-bridge-pattern\\\/\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/design-patterns-simplified-the-bridge-pattern\\\/\",\"name\":\"Bridge Pattern | Design Patterns Simplified - Simple Programmer\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/design-patterns-simplified-the-bridge-pattern\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/design-patterns-simplified-the-bridge-pattern\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2015\\\/06\\\/bridge.png\",\"datePublished\":\"2015-06-08T15:00:00+00:00\",\"dateModified\":\"2018-01-23T18:24:21+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/1abc70edfb189184827740310672de67\"},\"description\":\"In this post, I\u2019ll be covering the bridge pattern. Many experienced and inexperienced developers struggle with this build pattern.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/design-patterns-simplified-the-bridge-pattern\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/design-patterns-simplified-the-bridge-pattern\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/design-patterns-simplified-the-bridge-pattern\\\/#primaryimage\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2015\\\/06\\\/bridge.png\",\"contentUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2015\\\/06\\\/bridge.png\",\"width\":1089,\"height\":598,\"caption\":\"Image of Bridge pattern design pattern\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/design-patterns-simplified-the-bridge-pattern\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/simpleprogrammer.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Bridge Pattern\"}]},{\"@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":"Bridge Pattern | Design Patterns Simplified - Simple Programmer","description":"In this post, I\u2019ll be covering the bridge pattern. Many experienced and inexperienced developers struggle with this build pattern.","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\/design-patterns-simplified-the-bridge-pattern\/","og_locale":"en_US","og_type":"article","og_title":"Bridge Pattern | Design Patterns Simplified - Simple Programmer","og_description":"In this post, I\u2019ll be covering the bridge pattern. Many experienced and inexperienced developers struggle with this build pattern.","og_url":"https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/","og_site_name":"Simple Programmer","article_published_time":"2015-06-08T15:00:00+00:00","article_modified_time":"2018-01-23T18:24:21+00:00","og_image":[{"width":1089,"height":598,"url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/bridge.png","type":"image\/png"}],"author":"John Sonmez","twitter_card":"summary_large_image","twitter_misc":{"Written by":"John Sonmez","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/#article","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/"},"author":{"name":"John Sonmez","@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/1abc70edfb189184827740310672de67"},"headline":"Bridge Pattern","datePublished":"2015-06-08T15:00:00+00:00","dateModified":"2018-01-23T18:24:21+00:00","mainEntityOfPage":{"@id":"https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/"},"wordCount":2300,"commentCount":23,"image":{"@id":"https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/bridge.png","articleSection":["Architecture","Design","Frameworks","Infrastructure","Pluralsight","Process Improvement","Productivity","Web Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/","url":"https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/","name":"Bridge Pattern | Design Patterns Simplified - Simple Programmer","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/#primaryimage"},"image":{"@id":"https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/bridge.png","datePublished":"2015-06-08T15:00:00+00:00","dateModified":"2018-01-23T18:24:21+00:00","author":{"@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/1abc70edfb189184827740310672de67"},"description":"In this post, I\u2019ll be covering the bridge pattern. Many experienced and inexperienced developers struggle with this build pattern.","breadcrumb":{"@id":"https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/#primaryimage","url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/bridge.png","contentUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2015\/06\/bridge.png","width":1089,"height":598,"caption":"Image of Bridge pattern design pattern"},{"@type":"BreadcrumbList","@id":"https:\/\/simpleprogrammer.com\/design-patterns-simplified-the-bridge-pattern\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/simpleprogrammer.com\/"},{"@type":"ListItem","position":2,"name":"Bridge Pattern"}]},{"@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\/13795","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=13795"}],"version-history":[{"count":0,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts\/13795\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/media\/13806"}],"wp:attachment":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/media?parent=13795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/categories?post=13795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/tags?post=13795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}