Search code examples
design-patternslibraries

What is the difference between design patterns and libraries?


What is the difference between design patterns and libraries?

I cannot seem to find the difference anywhere.


Solution

  • DesingPatterns are considered to assist the developer by solveing already known problems. For instance, the ObserverPattern is used to observe a concreate object and carry out specific actions, the mediator is used to center the application logic and handle dependencies on a object, the composite is used to model a tree structure, etc. In general DesignPatterns can be categorized into three different types of patterns.

    1. creational
    2. behavioral
    3. structural

    In contrast, a library is a complete different thing. It's a piece of generic source code that can be used by other applications.