Design patterns vs Frameworks

后端 未结 12 1656
清歌不尽
清歌不尽 2021-01-31 10:52

Can someone illustrate what really is the difference between the two?

12条回答
  •  天涯浪人
    2021-01-31 11:07

    |------------------------|
    |          (------)      |
    |          (ClassA)      |
    |          (------)      |
    | (-----------)          |
    | ((Singleton))          |
    | (-----------)          |
    |         (---------)    |     
    |         ((Factory))    |
    |         (---------)    |
    |                        |
    |                        |
    |------------------------|
    
    Legend:
      |---|  Framework
      (---)  Class
      ()     Design Pattern
    

    A framework is a set of related classes to perform a certain task. Those classes may or may not implement a certain design pattern.

提交回复
热议问题