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.

The terms are thrown around loosely. Here is how I would define them:

The API is the design or *blueprint* that tell you how to interact with another body of code.

The framework is the actual code that *implements* the blueprint and that you link with.

For example, you write your code using the Cocoa APIs (e.g., the function calls to the code), but when you link your program, you link it against *some* library/framework that implements those calls. It could be Apple's implementation, but in theory, you could link it against someone else's implementation. There was a brief period in time when NeXT was promoting OpenStep -- an open standard for what has now become Cocoa, and at least one group was writing a library to implement it for X windows I believe. Sun was supposed to adopt OpenStep as their API, but they got all wrapped up with Java and abandoned OpenStep... now look where they are. :)

A better example is the UNIX APIs, which allows you to write your code using a standard set of library/system calls, and then you can build your program on multiple systems using multiple implementations of the API.

Todd

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to