What is the difference between a framework and a library?

后端 未结 19 2129
南旧
南旧 2020-11-22 11:46

What is the difference between a framework and a library?

I always thought of a library as a set of objects and

19条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 12:28

    A library performs specific, well-defined operations.

    A framework is a skeleton where the application defines the "meat" of the operation by filling out the skeleton. The skeleton still has code to link up the parts but the most important work is done by the application.

    Examples of libraries: Network protocols, compression, image manipulation, string utilities, regular expression evaluation, math. Operations are self-contained.

    Examples of frameworks: Web application system, Plug-in manager, GUI system. The framework defines the concept but the application defines the fundamental functionality that end-users care about.

提交回复
热议问题