开发者

After what point a JavaScript library is considered as a FrameWork? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answe开发者_高级运维rs to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

I am kind of confused with the definitions.

Can you please define the minimum "must haves" of a JavaScript library so that it can be considered as a software framework?

thanks


The distinction between a framework and a library is pretty fuzzy, in my opinion. Generally, software frameworks are larger-scale and usually "take over" your application (since they provide a basis, or "framework", for your application to be built upon). A library, on the other hand, just offers a collection of functions you can pick and choose from.

Wikipedia has some specific criteria for distinguishing frameworks from libraries as well:

  1. inversion of control - In a framework, unlike in libraries or normal user applications, the overall program's flow of control is not dictated by the caller, but by the framework.
  2. default behavior - A framework has a default behavior. This default behavior must actually be some useful behavior and not a series of no-ops.
  3. extensibility - A framework can be extended by the user usually by selective overriding or specialized by user code providing specific functionality.
  4. non-modifiable framework code - The framework code, in general, is not allowed to be modified. Users can extend the framework, but not modify its code.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜