Re: What's the differnece between API and Framework?
Re: What's the differnece between API and Framework?
- Subject: Re: What's the differnece between API and Framework?
- From: Michael Ash <email@hidden>
- Date: Thu, 21 May 2009 21:54:25 -0400
On Thu, May 21, 2009 at 9:38 PM, Chunk 1978 <email@hidden> wrote:
> ok... so an API is like a lower level framework? wikipedia states
> that Carbon and Cocoa are APIs on Mac, but i always thought those were
> frameworks.
They are both!
API stands for Application Programming Interface. "Interface" is the
key word. An API is not something that actually does work, it's just
an interface. In terms of a crappy metaphor, the API is the menu, and
the framework is the restaurant. The API tells you what's available
and what the stuff does, and then the framework is what actually does
the work.
For example, look at the NSString documentation. It lists a bunch of
methods, and tells you what they do. That is the NSString API. By
itself that is useless, of course. The Cocoa framework contains the
NSString *implementation* which actually makes the API do stuff.
MIke
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden