When a pattern (repeating concept) of some kind is discovered, the question is raised: where should it be implemented? To begin to answer this, the following questions, at least, need to be asked:
- How often does it occur
- In what domains does it occur often or rarely
- Is it best to address the pattern in:
- App language
- A general-purpose library/API (sold as a package or posted on OSS sites)
- A per-application or per-shop library/API (specific app language)
- An app-language-independent service (such as a DBMS, file system, web service, etc.)
- Should such a service be mostly imperative or declarative (such as a markup language/interface)?
A language generally has limits on which patterns it can 'abstract', so the library route may require a great deal of
BoilerPlateCode for each use of the pattern. Indeed,
SoftwareDesignPatterns are exactly the class of patterns that cannot be abstracted, and the
GangOfFour DesignPatterns focus on what cannot be abstracted in typical OOP languages.
CategoryInfoPackaging, CategoryPattern