Gang of Four

Also known as Simple Factory Static Factory Method Intent Providing a static method encapsulated in a class called the factory, to hide the implementation logic and make client code focus on usage rather than initializing new objects. Explanation Real-world example Imagine an alchemist who is about to manufacture coins. The alchemist must be able to create both gold and copper coins and switching between them must be possible without modifying the existing source code.
Factory Method
Also known as Virtual Constructor Intent Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses. Explanation Real-world example Blacksmith manufactures weapons. Elves require Elvish weapons and orcs require Orcish weapons. Depending on the customer at hand the right type of blacksmith is summoned. In plain words It provides a way to delegate the instantiation logic to child classes.
Intent Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype. Explanation First, it should be noted that the Prototype pattern is not used to gain performance benefits. It’s only used for creating new objects from prototype instances. Real-world example Remember Dolly? The sheep that was cloned! Let’s not get into the details but the key point here is that it is all about cloning.
Intent Ensure a class only has one instance, and provide a global point of access to it. Explanation Real-world example There can only be one ivory tower where the wizards study their magic. The same enchanted ivory tower is always used by the wizards. The ivory tower here is a singleton. In plain words Ensures that only one object of a particular class is ever created. Wikipedia says In software engineering, the singleton pattern is a software design pattern that restricts the instantiation of a class to one object.
Chain of responsibility
Intent Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it. Explanation Real-world example The Orc King gives loud orders to his army. The closest one to react is the commander, then an officer, and then a soldier. The commander, officer, and soldier form a chain of responsibility.
Also known as Action, Transaction Intent Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations. Explanation Real-world example There is a wizard casting spells on a goblin. The spells are executed on the goblin one by one. The first spell shrinks the goblin and the second makes him invisible. Then the wizard reverses the spells one by one.
Intent Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language. Explanation Real-world example The halfling kids are learning basic math at school. They start from the very basics “1 + 1”, “4 - 2”, “5 + 5”, and so forth. In plain words Interpreter pattern interprets sentences in the desired language. Wikipedia says In computer programming, the interpreter pattern is a design pattern that specifies how to evaluate sentences in a language.
Also known as Cursor Intent Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation. Explanation Real-world example Treasure chest contains a set of magical items. There multiple types of items such as rings, potions, and weapons. The items can be browsed by type using an iterator the treasure chest provides. In plain words Containers can provide a representation agnostic iterator interface to provide access to the elements.
Intent Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently. Explanation Real-world example Rogue, wizard, hobbit, and hunter have decided to join their forces and travel in the same party. To avoid coupling each member with each other, they use the party interface to communicate with each other.