Is there still a difference between a library and

2019-03-07 17:13发布

Whenever I ask people about the difference between an API and a library, I get different opinions. Some give this kind of definition, saying that an API is a spec and a library is an implementation...

Some will tell you this type of definition, that an API is a bunch of mapped out functions, and a Library is just the distribution in compiled form.

All this makes me wonder, in a world of web code, frameworks and open-source, is there really a practical difference anymore? Could a library like jQuery or cURL crossover into the definition of an API?

Also, do frameworks cross over into this category at all? Is there part of Rails or Zend that could be more "API-like," or "libraryesque"?

Really looking forward to some enlightening thoughts :)

7条回答
叼着烟拽天下
2楼-- · 2019-03-07 18:12

In Clear and concise language

Library: Collection of all classes and methods stored for re-usability

API: Part of library classes and methods which can be used by a user in his/her code.

查看更多
登录 后发表回答