views:

61

answers:

4

Hey guys

Just Randomly got this question in my head! Whats the difference between API , Framework and middleware? Essentially all of them provide abstract low level services to apps. In that case why is dot net called framework and windows API called well.. API?

+1  A: 

A framework implements an API. The API isolates framework clients from the implementation details of the underlying framework. Thus (broadly speaking) you can use Mono or .Net Framework to run a program based on common source code, because the API to either framework is the same.

Middleware is typically a framework specialized for interprocess communication.

Steve Townsend
+2  A: 

An API is an Application Programmer Interface. Its just a term that refers to the methods a programmer will use to interface with the software. For example, a DAO might have a save() method. Save is part of the DAO API. At a high level, you might have an Add User to System functionality. Thats part of the system API.

A framework is a tool or set of tools. For example, Spring is a framework that manages your inversion of control, dependency injection, and provides nifty templates to make your life easier. You use Spring via its API.

Middleware is software that allows a bunch of isolated systems or functionalities to interact. So if you have a website, and a payment system, you use middleware to hookem up.

hvgotcodes
+1  A: 

An API is a programatic interface to a system. You use it to interact with a system, but does not force any structure in your program (ideally).

A framework, dictates the way you write certain types of applications in order to reduce the amount of boilerplate needed. It solves some common problems for the applications of it's type.

Middleware is mostly marketing-speak. There are many definitions, but usually involve a big framework with some tooling built around it. Some commercial game engines can be thought of middleware, SOA platforms also are referred as middleware, etc.

juancn
A: 

The main difference is the purpose of functionality.

An API is designed to solve some specific problem in a particular domain.it contains necessary data structure, classes,methods,interface etc. Such as ADO.net API provides the functionality to connecting Microsoft SQL Server.

A framework designed to help developer to reusable,scalable software application.a frameworks has no specific functionality like API but its various functionality exposed by API . Such as , ADO.net is an API of .net framework for accessing data service. A framework has compiler, programs,class libraries,run-time.it can add plug-in.

gypsyNight