Design patterns – elements
A design pattern attempts to record those aspects of a recurring design in object-oriented systems that solve a problem or a class of problems.
When we inspect design patterns, we find that almost all of them have the following elements:
- Name: A well-known handle or title, which is commonly used to describe the pattern. Having standard names for design patterns aids communication and increases our design vocabulary.
- Context: This is the situation in which the problem arises. A context can be generic such as Develop a web application software, or specific such as Implementing resource-change notification in a shared memory implementation of the publisher-subscriber system.
- Problem: Describes the actual problem that the pattern is applied to. A problem can be described in terms of its forces, which are as follows:
- Requirements: The requirements that the solution should fulfill, for example, the publisher-subscriber pattern implementation must support HTTP.
- Constraints...