fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@ -0,0 +1,30 @@
---
title: Behavioral patterns
---
## Behavioral patterns
Behavioral design patterns are design patterns that identify common communication problems between objects and realize these patterns. By doing so, these patterns increase flexibility in carrying out this communication, making the software more reliable and easy to mantain.
Examples of this type of design pattern include:
1. **Chain of responsibility pattern**: Command objects are handled or passed on to other objects by logic-containing processing objects.
2. **Command pattern**: Command objects encapsulate an action and its parameters.
3. **Interpreter pattern**: Implement a specialized computer language to rapidly solve a specific set of problems.
4. **Iterator pattern**: Iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.
5. **Mediator pattern**: Provides a unified interface to a set of interfaces in a subsystem.
6. **Memento pattern**: Provides the ability to restore an object to its previous state (rollback).
7. **Null Object pattern**: Designed to act as a default value of an object.
8. **Observer pattern**: a.k.a. P**ublish/Subscribe** or **Event Listener**. Objects register to observe an event that may be raised by another object.
9. **Weak reference pattern**: De-couple an observer from an observable.
10. **Protocol stack**: Communications are handled by multiple layers, which form an encapsulation hierarchy.
11. **Scheduled-task pattern**: A task is scheduled to be performed at a particular interval or clock time (used in real-time computing).
12. **Single-serving visitor pattern**: Optimize the implementation of a visitor that is allocated, used only once, and then deleted.
13. **Specification pattern**: Recombinable business logic in a boolean fashion.
14. **State pattern**: A clean way for an object to partially change its type at runtime.
15. **Strategy pattern**: Algorithms can be selected on the fly.
16. **Template method pattern**: Describes the program skeleton of a program.
17. **Visitor pattern**: A way to separate an algorithm from an object.
### Sources
[https://en.wikipedia.org/wiki/Behavioral_pattern](https://en.wikipedia.org/wiki/Behavioral_pattern)

View File

@ -0,0 +1,21 @@
---
title: Creational patterns
---
## Creational patterns
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 in added complexity to the design. Creational design patterns solve this problem by somehow controlling this object creation.
Creational design patterns are composed of two dominant ideas. One is encapsulating knowledge about which concrete classes the system uses. Another is hiding how instances of these concrete classes are created and combined.<sup1</sup>
Five well-known design patterns that are parts of creational patterns are:
1. **Abstract factory pattern**, which provides an interface for creating related or dependent objects without specifying the objects' concrete classes.
2. **Builder pattern**, which separates the construction of a complex object from its representation so that the same construction process can create different representations.
3. **Factory method pattern**, which allows a class to defer instantiation to subclasses.
4. **Prototype pattern**, which specifies the kind of object to create using a prototypical instance, and creates new objects by cloning this prototype.
5. **Singleton pattern**, which ensures that a class only has one instance, and provides a global point of access to it.
### Sources
1. [Gamma, Erich; Helm, Richard; Johnson, Ralph; Vlissides, John (1995). Design Patterns. Massachusetts: Addison-Wesley. p. 81. ISBN 978-0-201-63361-0. Retrieved 2015-05-22.](http://www.pearsoned.co.uk/bookshop/detail.asp?item=171742)

View File

@ -0,0 +1,27 @@
---
title: Algorithm Design Patterns
---
## Algorithm Design Patterns
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.
Design patterns can speed up the development process by providing tested, proven development paradigms.
This patterns are divided in three major categories:
### Creational patterns
These 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 in added complexity to the design. Creational design patterns solve this problem by somehow controlling this object creation.
### Structural patterns
These are design patterns that ease the design by identifying a simple way to realize relationships between entities.
### Behavioral patterns
These 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.
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->
[Design patterns - Wikipedia](https://en.wikipedia.org/wiki/Design_Patterns)

View File

@ -0,0 +1,28 @@
---
title: Structural patterns
---
## Structural patterns
Structural design patterns are design patterns that ease the design by identifying a simple way to realize relationships between entities and are responsible for building simple and efficient class hierarchies between different classes.
Examples of Structural Patterns include:
1. **Adapter pattern**: 'adapts' one interface for a class into one that a client expects.
2. **Adapter pipeline**: Use multiple adapters for debugging purposes.
3. **Retrofit Interface Pattern**: An adapter used as a new interface for multiple classes at the same time.
4. **Aggregate pattern**: a version of the Composite pattern with methods for aggregation of children.
5. **Bridge pattern**: decouple an abstraction from its implementation so that the two can vary independently.
6. **Tombstone**: An intermediate "lookup" object contains the real location of an object.
7. **Composite pattern**: a tree structure of objects where every object has the same interface.
8. **Decorator pattern**: add additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes.
9. **Extensibility pattern**: a.k.a. Framework - hide complex code behind a simple interface.
10. **Facade pattern**: create a simplified interface of an existing interface to ease usage for common tasks.
11. **Flyweight pattern**: a large quantity of objects share a common properties object to save space.
12. **Marker pattern**: an empty interface to associate metadata with a class.
13. **Pipes and filters**: a chain of processes where the output of each process is the input of the next.
14. **Opaque pointer**: a pointer to an undeclared or private type, to hide implementation details.
15. **Proxy pattern** a class functioning as an interface to another thing.
### Sources
[https://en.wikipedia.org/wiki/Structural_pattern](https://en.wikipedia.org/wiki/Structural_pattern)