<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Teresa Talbot on Medium]]></title>
        <description><![CDATA[Stories by Teresa Talbot on Medium]]></description>
        <link>https://medium.com/@ttalbot?source=rss-5dbbf2bb7e0a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*2AsrCl2StH0m7mX-K6YZow.jpeg</url>
            <title>Stories by Teresa Talbot on Medium</title>
            <link>https://medium.com/@ttalbot?source=rss-5dbbf2bb7e0a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 12:04:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ttalbot/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Making sense of Software Design Patterns]]></title>
            <link>https://medium.com/@ttalbot/making-sense-of-software-design-patterns-e63856a97f2e?source=rss-5dbbf2bb7e0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e63856a97f2e</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[object-oriented]]></category>
            <dc:creator><![CDATA[Teresa Talbot]]></dc:creator>
            <pubDate>Sun, 03 Jun 2018 10:46:26 GMT</pubDate>
            <atom:updated>2018-06-03T10:53:17.642Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WaV6bOkoDIiVT1FQSQ6BJg.jpeg" /></figure><p>This post is the first in a series aimed at those who want to understand more about design patterns in software development. Here we’ll take a step back and consider what design patterns are in real-world terms and how they can help developers as individuals and in teams. In later posts, we’ll look at specific design patterns in .Net, but this introduction is suitable for anybody interested in learning about design patterns in Object-Oriented Programming (OOP) without diving into any implementation details.</p><h4>Contents</h4><ul><li>A definition of design patterns in the contexts of everyday life and programming.</li><li>The benefits of using design patterns in OOP.</li><li>Tips for learning about and using design patterns.</li></ul><h4>This post aims to:</h4><ul><li>Clarify what design patterns are and what we really achieve when we use them.</li><li>Favour examples and ‘real-world’ context over lengthy technical descriptions.</li><li>Give you confidence in having a go at using design patterns.</li></ul><h3>What are design patterns?</h3><h4>Patterns in the real world</h4><p>The easiest way to understand design patterns is to first consider patterns in their simplest form. A pattern is a repetition or sequence that carries meaning to us. In our everyday lives, patterns can help us achieve our aims faster and with the right outcome. It is probably easier and more efficient (not to mention less stressful) if we plan the journey to the apartment we’ve rented for our holiday, than to just leave home and figure it out as we go, deciding which way to turn and which form of transport to take as each possibility arises.</p><h4>Design patterns as travel guides</h4><p>Let’s apply this to software development. There are often a seemingly endless number of ways to complete a given task or solve a problem. How do we approach choosing a strategy? Design patterns can be thought of as guides provided by other developers that show us the way.</p><p>Of all the possible routes to our holiday apartment, we’ve narrowed it down to a few that are most recommended by others. This bring us to one of the key reasons for the existence of design patterns. Like an Ordinance-Survey map or great recipe, a design pattern used by software developers around the world is used for reason — it’s tried and tested.</p><h4>Design patterns are not instructions</h4><p>It’s important to highlight the flexibility of such guides. Design patterns are not there to give step by step instructions, but to provide a template. Depending on what we want out of our route (do we want the prettiest views or the cheapest ticket?) our choice will vary. It’s unlikely that we will get everything we want in a single route and we need to consider if the route will work in every context — if we need a route suitable for wheelchair users, a route suitable for some will not be suitable for us. In the same way, a design pattern might be suitable for one context but not another. However, by having a variety of approaches available to us means we have a good chance of choosing something that solves our problem.</p><h3>Design Patterns in Object-Oriented Programming (OOP)</h3><h4>Gang of Four</h4><p>The Gang of Four probably need no introduction, but in short, they did the leg-work and compiled a list of design patterns which are used widely in OOP (<em>Design Patterns: Elements of Reusable Object-Oriented Software</em>). Later posts in this series will concentrate on these patterns.</p><h3>Why use design patterns?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*q0X003Pg6uJkhUFmO-cJiQ.jpeg" /></figure><p>Hopefully it’s already clear by now that design patterns are useful because they’re solutions widely used for the same types of problems, giving us the template to start with so we don’t have to work from scratch or ‘re-invent the wheel’. Let’s go into some added benefits design patterns can provide.</p><h4>Patterns with principles</h4><p>There are many best-practices and principles to consider when designing software which we will not cover here, but which the recommended and most popular design patterns tend to embody. Basically — regardless of the pattern you choose, you should be able to describe your code using good principles (e.g. SOLID). If you’re not sure what the SOLID principles are, it’s worth brushing up.</p><h4>Patterns as communication</h4><p>One of the things I like about design patterns is that they provide ubiquitous terminology. If we’ve chosen a well known pattern, we can effectively and quickly communicate to other developers which approach we’re considering or the structure of something we’ve built. This means we can get straight down to speaking specifically.</p><h4>Documentation for all developers</h4><p>Due to the well-documented nature of design patterns, developers at any level can try out a pattern and see if it works for their given problem. I’ll be concentrating on specific patterns in future posts in the hopes of adding to the wealth of resources already available.</p><h3>Design pattern tips</h3><h4>Do some homework…</h4><p>I’ve been learning design patterns by choosing a pattern and doing some research on it (this could be every week or however often you get a chance to do some learning). There are plenty of posts on design patterns out there and a quick search will bring up lots of results.</p><ol><li>Explain what the pattern is in a way that you understand. There are a lot of technical definitions, some of which I found intuitive but many that I didn’t, so it’s worth trying to get down on paper something that makes sense to you.</li><li>Explain when/why would you use this pattern. Real-world examples can be really helpful here to cement your understanding.</li><li>Have a go! Even if you’ve read through a blog post or tutorial with code examples, I’ve found there’s real value in writing a little console app to demonstrate the pattern. Plus, you get a break from reading and can have some fun with the apps (I think I had one app that created planets and one that sold retro video games).</li></ol><h4>…and then explain your homework to someone else</h4><p>There’s no better test of your understanding than explaining it to another developer, or possibly even better, getting it down on paper (one big motivation for this blog series is exactly that).</p><h4>Have a list of patterns handy</h4><p>When faced with a problem, I’ve found it helpful to have the pattern archive I’ve written to hand — I can quickly see what each pattern does and when to use it. A good solution might not be amongst what I have so far, but it gives me a good place to start in terms of understanding what I’m trying to achieve.</p><h4>Take a step back</h4><p>I’m guilty of getting too close to the code I’m working on and not stepping back to see the wider problem. If this sounds like you, return to your initial aim regularly and check to make sure you’re on track. Is the approach you’re considering going to meet the business requirement? How does the pattern help you achieve what you want in the context of the whole application? Can it be done in a simpler way?</p><h4>Don’t be afraid to change plan</h4><p>If many of the design patterns are new to you, there are going to be times when your first choice or attempt isn’t quite right, and that’s OK. I have sometimes found that after choosing a pattern and trying it out, I’ve realised it isn’t the right solution, or learnt things about my code that could be improved. Obviously it isn’t wise to spend time trying every pattern, but trying to hold on to an ill-fitting pattern for the sake of it isn’t either.</p><h4>Remember, there is no right answer…</h4><p>Whilst the Gang of Four design patterns are widely renowned, there is still plenty of discussion about their application, and given your specific requirements and context, there is unlikely to be a right answer when it comes to choosing a pattern.</p><h4>…but always have an explanation for your approach</h4><p>On the other hand, if you can’t think of any reasons why you’ve chosen a pattern, it’s probably not a good sign. Make sure you can explain the reasoning behind your choice and what other options you considered.</p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e63856a97f2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>