0

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?

08Dc91wk
  • 3,970
  • 6
  • 28
  • 64
RGJava
  • 37
  • 1
  • 8
  • 1
    The I in API stands for Interface. A Framework includes implementation. An API could as well be implemented by more than one framework. – Fildor Jul 16 '15 at 17:12
  • This http://stackoverflow.com/questions/8772746/difference-between-framework-vs-library-vs-ide-vs-api-vs-sdk-vs-toolkits post might help. It is very neatly explained. – PaperTsar Jul 16 '15 at 17:20
  • already seen that post. still not clear. – RGJava Jul 16 '15 at 17:30
  • 1
    possible duplicate of [Framework Vs. API](http://stackoverflow.com/questions/724380/framework-vs-api) – John Jul 16 '15 at 17:35
  • "Collections Framework and Collections API" There is no difference. – Louis Wasserman Jul 16 '15 at 17:49

1 Answers1

1

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.