dcsimg
What is the difference between an API and a framew...
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Saturday, March 10, 2001 08:04 PM

What is the difference between an API and a framework?

Re: What is the difference between an API and a framew...

Posted By:   Michael_Wax  
Posted On:   Friday, March 30, 2001 06:42 PM

Here is a less formal definition:


A framework is a set of classes which handles the flow necessary to perform a complex task, but which requires plug-in classes specific to your application (database, app server), and which allows for additional plug-in classes to extend the functionality. For example, you could have a framework which handles the general flow of an online store. This framework would handle tasks such as "put item in shopping cart", "generate order on checkout", etc. On the other hand, you would need to provide the classes which enable the framework to persist the shopping cart to the database of your choice, to connect to a credit-card processor, to send orders to a warehouse, among other things. Further, if you wanted to decided that you wanted to offer monogramming, you would need to provide classes to do so, and the framework should make it easy to plug these in.


An API is really no more than a set of method signatures and other information necessary to use a class or set of classes. The API is totally distinct from the implementation. For example, a number of vendors have implemented the servlet API, each in a different way. The API by itself has no implementation.


A class library would have an API, as would a framework.

Re: What is the difference between an API and a framew...

Posted By:   Omar_Khan  
Posted On:   Monday, March 19, 2001 01:47 AM

According to Computer Desktop Encyclopedia a framework -better application framework- is " A class library that provides the foundation for programming an object-oriented application" while an API (application program interface) is "A language and message format used by an application program to communicate with the operating system or some other system or control program such as a database management system (DBMS) or communications protocol."


It seems to me that an application framework strictly regards object-oriented technology while APIs are not necessarly implemented with o-o. They are just functions provided by developers of a certain applicaton that enable programmers and customizers to interface and access to it with no reference to the technology used.
About | Sitemap | Contact