Now, this may be a silly question but sometimes the terms Framework and API are used interchangeably. The way I see it is that a Framework is a bigger more generic thing, containing many API's, that could be used for various programming tasks (for example, the .NET Framework.) An API is smaller and more specialized (for example, the Facebook API.) Anyone want to share their insights on the matter?
And take for instance that Microsoft call .NET a Framework whereas Sun calls theirs a Platform ... so could it be also a business/marketing decision as to how call a "collection of libraries."?
A framework is a group of classes, interfaces and other pre-compiled code upon which or by the use of which applications can be built. The API is the public face of a framework. A well designed framework only exposes those classes, interfaces, etc that are needed to use the framework.
Web API is an API as the name suggests, it can be accessed over the web using the HTTP protocol. It is a framework that helps you to create and develop HTTP based RESTFUL services. The web API can be developed by using different technologies such as java, ASP.NET, etc.
An API is just a definition of a bunch of function you can call, and is a part of both libraries and frameworks.
API frameworks are code libraries that provide commonly-used functionality when building your own web application programming interfaces (APIs).
Design Patterns provide the following definitions:
The key here is that while toolkits (APIs) can be useful in many domains, frameworks are geared to solve issues for specific classes of problems, that can be customized "by creating application specific subclasses of abstract classes of the framework".
Moreover, and maybe more importantly, "the framework dictates the architecture of your application": Inversion Of Control is one of the characteristics of frameworks (see Martin Fowler on this); instead of having your application call specific APIs to implement a specific behavior, it's the framework that calls your code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With