Difference between a module, library and a framework

前端 未结 9 1558
走了就别回头了
走了就别回头了 2020-12-07 07:13

In popular programming speak, what is the difference between these terms and what are the overlaps?

Any related terms I\'m missing out?

9条回答
  •  悲哀的现实
    2020-12-07 07:41

    Roughly, I'd consider it this way: a module is an importable "atom" of functionality; it defines the smallest subset of grouped functionality that can be used (note that it's not the smallest unit of functionality; that would be a class (or function, depending)). A library would be, in this approach, a set of modules; you can use a library without using all of the modules that are part of that library. A framework is the environment upon which the library (likely) depends; it makes up the baseline environment within which all of the above work.

    Note that these terms are somewhat fungible, and these definitions will not always be solid in every situation; this is just my interpretation of some of the common usages I've come across.

提交回复
热议问题