Reputation: 37
What would be the difference between the Collections Framework and Collections API? I have heard that "API is a subset of a framework". Wouldn't it be the other way around since a framework provides a more specific function, while an interface is more broad and abstract? I've also heard that a framework can contain multiple APIs. Does that mean that also frameworks are custom made?
Upvotes: 0
Views: 504
Reputation:
Firstly, what is the definition of API? According to Beal (n.d.), the API "is a set of routines, protocols, and tools for building software applications. The API specifies how software components should interact and APIs are used when programming graphical user interface (GUI) components."
Secondly, what is a framework? According to Rouse (205), "a framework is often a layered structure indicating what kind of programs can or should be built and how they would interrelate."
So, the framework dictates what kind of programs can or should be built. Meanwhile, an API specifies how software components should interact. From the definitions, it could be told that the framework is the skeleton of the program, while the API is the organ system of the program. Additionally, a framework consists of multiple APIs. For instance, the Microsoft .NET Framework, it provides several APIs such as the System.IO, System.Data, etc.
References
Beal, V. (n.d.). API - Application program interface. Webopedia. Retrieved 07-17-2015 from http://www.webopedia.com/TERM/A/API.html.
Rouse, M. (2015, February). Framework. WhatIs. Retrieved 07-17-2015 from http://whatis.techtarget.com/definition/framework.
Upvotes: 1