Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhiephie/4931399ff84b88dd7f772c286322aa23 to your computer and use it in GitHub Desktop.
Save zhiephie/4931399ff84b88dd7f772c286322aa23 to your computer and use it in GitHub Desktop.

Learning Plan for Design Patterns and Principles of Good Design

These learning resources primarily focus on programming using Good Design Principles and Design Patterns

  • There is an emphasis on learning using PHP, although most patterns are universal to every object orientated language.
  • All these resources are free (at the time of writing)

Table of Contents

1. Video (YouTube)

  • Object Oriented Design - Derek Banas (2012)
    • Derek creates several OO Designs using UML diagrams, before creating the code in Java.
  • SOLID Principles of Object Oriented and Agile Design - Bob Martin (2015) (start 12:25) YouTube 1h 10m
  • Software Design Patterns and Principles (quick overview) - TechLead (2018) YouTube 11m23s. Keep it simple. TechLead briefly explained the design patterns he uses.
  • Design Patterns Video Tutorial - Derek Banas (2014) (Total playtime 7h 4m) - Covers 24 design patterns!

    In my Design Patterns Video Tutorial I will cover all of the most common design patterns. I'll also explain when to use them and other topics on OOP design principles

  • Chasing "Perfect" - Adam Wathan - Laracon EU 2015, YouTube 45 min
    • Real time coding, clean code, using tests at every step of the process.
    • This is also listed in my TDD plan. It is well worth another watch, after learning more about Patterns the refactoring made much more sense.
  • PHP Design Patterns - Elements of Reusable Object-Oriented Software - Easy Learn Tutorial (2014) - covers 8 design patterns.

    Design patterns are key to good PHP programming, and a fundamental to anyone wanting to learn PHP and become a better programmer. Design patterns are solutions for common problems that people have discovered and documented, so you don't have to re-invent the wheel every time you run into one of these problems on your next software engineering project.

  • Design Patterns - Smok (Rafal Swidzinski) (2019) - Java (~1h 10m) - A brief explanation of the 23 design patterns from GoF book.

    Software Design Patterns have been around for a while. It is finally time to get to know them. In this video I introduce the most important terms, and explain what Design Patterns are about. So if you want to learn a Design Patterns - this is a good place to start.

  • SOLID Principles - craigctp (2012) (~14 min) 5 video series.

    DevExpress CTO Messages for the SOLID object oriented development Principles.

2. Podcasts

  • 16: Kent Beck - Tiny Decisions and Emergent Design - FullStackRadio #16 Podcast

    In this episode, Adam talks to Kent Beck about Smalltalk vs. Java, low level design vs. big picture architecture, planning for the future vs. emergent design, and applying the principles of Extreme Programming in 2015.

  • 22: Corey Haines - The 4 Rules of Simple Design - FullStackRadio #22 Podcast

    ... Every episode, Adam Wathan is joined by a guest [Corey Haines] to talk about everything from product design and user experience to unit testing and system administration.

3. Books, manuals and websites (inc. BlogPosts)

Design Patterns

  • Book:Design Patterns - Wikipedia, links to Wikipedia articles on design patterns (at the time of writing, the book is not available for download):
    • Overview:
    • Creational Patterns:
      • Creational pattern, Abstract factory pattern, Builder pattern, Factory method pattern, Lazy initialization, Multiton pattern, Object pool pattern, Prototype pattern, Resource Acquisition Is Initialization, Singleton pattern
    • Structural patterns:
      • Structural pattern, Adapter pattern, Bridge pattern, Composite pattern, Decorator pattern, Facade pattern, Front Controller pattern, Flyweight pattern, Proxy pattern
    • Behavioral patterns:
      • Behavioral pattern, Chain-of-responsibility pattern, Command pattern, Interpreter pattern, Iterator pattern, Mediator pattern, Memento pattern, Null Object pattern, Observer pattern, Publish/subscribe, Design pattern Servant, Specification pattern, State pattern, Strategy pattern, Template method pattern, Visitor pattern
    • Concurrency patterns:
      • Concurrency pattern, Active object, Balking pattern, Messaging pattern, Double-checked locking, Asynchronous method invocation, Guarded suspension, Lock, Monitor, Reactor pattern, Readers-writer lock, Scheduler pattern, Thread pool pattern, Thread-local storage
  • Design Patterns - SourceMaking.com, detailed articles on code examples are given in Java, C++, PHP and Python

    In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn't a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.

    • Creational patterns - 6 patterns (Abstract Factory, Builder, Factory Method, Object Pool, Prototype and Singleton)

      In software engineering, creational design patterns are design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situation. The basic form of object creation could result in design problems or added complexity to the design. Creational design patterns solve this problem by somehow controlling this object creation.

    • Structural patterns - 8 patterns (Bridge, Composite, Decorator, Facade, Flyweight, Private Class Data and Proxy)

      In Software Engineering, Structural Design Patterns are Design Patterns that ease the design by identifying a simple way to realize relationships between entities.

    • Behavioral patterns - 11 patterns (Chain of responsibility, Command, Interpreter, Iterator, Mediator, Memento, Null Object, Observer, State, Strategy, Template method, Visitor)

      In software engineering, behavioral design patterns are design patterns that identify common communication patterns between objects and realize these patterns. By doing so, these patterns increase flexibility in carrying out this communication.

  • Design Patterns - PHPTheRightWay.com (Factory, Singleton, Strategy, Front Controller, Model-View-Controller)

    There are numerous ways to structure the code and project for your web application, and you can put as much or as little thought as you like into architecting. But it is usually a good idea to follow common patterns because it will make your code easier to manage and easier for others to understand.

  • DesignPatternsPHP - Dominik Liebler (c2015)

    This is a collection of known design patterns and some sample code how to implement them in PHP. Every pattern has a small list of examples (most of them from Zend Framework, Symfony2 or Doctrine2 as I’m most familiar with this software).

    • The book has all the documentation and code on Github, including tests!
  • PHP design patterns PHPEnthusiast (c2015)
  • Design Patterns Book Original book by GoF, with links to articles
  • Design patterns implemented in Java - Iluwatar (Github)
  • Design Patterns - PavelLoparev (Github) (2017)

    Contains examples of design patterns that are implemented using PHP

  • GoFPatterns

    In this course you will learn what the GOF (Gang of Four) patterns are and how they help solve common problems encountered in object-oriented design.

    • Design Patterns are a software engineering concept describing recurring solutions to common problems in software design.
  • The Catalogue of Design Patterns - Refactoring Guru (Partner site to SourceMaking.com)
  • Design Patterns for Humans - kamranahmedse (Github) (2018)

    Ultra-simplified explanation to design patterns!

  • Awesome Software Design Patterns - DovAmir (Github) (2019)

    A curated list of software and architecture related design patterns.

  • Design Patterns in PHP Andrew (c2019) - 23 design patterns with short PHP scripts.

    Patterns in PHP. Today we will discuss design patterns in web development, more precisely – in PHP.

[Principles of Good Design

  • SOLID principles of object-oriented programming - wikipedia (2-3 minutes)

    SOLID is a mnemonic acronym for five design principles intended to make software designs more understandable, flexible and maintainable.

    • Single responsibility principle
      • A class should only have a single responsibility, that is, only changes to one part of the software's specification should be able to affect the specification of the class.
    • Open–closed principle
      • "Software entities ... should be open for extension, but closed for modification."
    • Liskov substitution principle
      • "Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program." See also design by contract.
    • Interface segregation principle
      • "Many client-specific interfaces are better than one general-purpose interface."
    • Dependency inversion principle
      • One should "depend upon abstractions, [not] concretions."
  • GRASP (object-oriented design) - wikipedia (6-8 minutes)

    General Responsibility Assignment Software Patterns (or Principles), abbreviated GRASP, consist of guidelines for assigning responsibility to classes and objects in object-oriented design. The different patterns and principles used in GRASP are controller, creator, indirection, information expert, high cohesion, low coupling, polymorphism, protected variations, and pure fabrication.

  • KISS principle - wikipedia (5-6 minutes)

    KISS, an acronym for "keep it simple, stupid"

  • Don't repeat yourself - wikipedia (3-4 minutes)

    DRY is a principle of software development aimed at reducing repetition of software patterns, replacing it with abstractions or using data normalization to avoid redundancy.

  • Software design pattern - wikipedia (25-32 minutes)

    In software engineering, a software design pattern is a general, reusable solution to a commonly occurring problem within a given context in software design. It is not a finished design that can be transformed directly into source or machine code. It is a description or template for how to solve a problem that can be used in many different situations. Design patterns are formalized best practices that the programmer can use to solve common problems when designing an application or system.

  • S.O.L.I.D: The First 5 Principles of Object Oriented Design - Samuel Oloruntoba (2015). 12-15 minutes read.
  • S.O.L.I.D design principles for everyone - Reddit u/juanorozcov (AKA Juan Orozco Villalobos) posted links to his article on BrainsToBytes:

4. Tooling

5. Conclusion

Tips for Learning

Start shallow and broad. Skim as many as you can at the beginning. When you know what they do go deeper, only if you need to. - Smok

My take on this is to learn the different patterns, where they would be used, but do not memorise how to program every one. Once code is refactored and a pattern identified, then use the examples from above to implement the exact programming pattern.

I think the problem with patterns is that often people do know them but don't know when to apply which. - Dominik Liebler (DesignPatternsPHP)

My take is the patterns need to be known and what context they are best used for.

6. Other Learning Plans

The previous plan to Design Patterns is Learning Plan for Test Driven Development (TDD)

7. License

This learning plan is open-source licensed under the MIT license.

Copyright (c) 2019 Pen-Y-Fan

Permission is hereby granted, free of charge, to any person obtaining a copy of this learning plan and associated documentation files (the "Plan"), to deal in the Plan without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Plan, and to permit persons to whom the Plan is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Plan.

Content copied from Wikipedia.org is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment