On Thu, May 29, 2008 at 12:06 AM, bo <[EMAIL PROTECTED]> wrote:

> I think an API is a small program that lets other programs
> communicate with an OS. I did see them described as protocols. I am
> not sure which.

Not quite. API is 'Application Programming Interface' and is provided
by an application vendor for developers to create 'extensions' to an
application using a public programming interface. The API is usually a
library that you link to either at compile time or run-time. An API
can be provided for different languages, even scripting languages.
Operating systems provide a system API, so you can make system calls
for things like file I/O, process management, etc. Some applications
provide a plugin API, a specified set of functions your plugin must
use to be able to run within the host application.

http://en.wikipedia.org/wiki/API

> Object oriented I think I understand. It is a programmng method that
> uses modules which can be called by a program. This enables the
> program to make use of reuse, and code hiding. It makes for a quicker
> program. Similar to the subroutines we use to use in programming
> basic, but instead of embeding them in the program the OO modules are
> separate like DLL files and can be called. From what I understand
> API's can be built using OO.

Even further off. I'd do a bit more research on what Object-oriented
programming is... do a Google search. Have you ever used C++?

> The discussion is on why one is better. I said that I didn't think
> one was better. The API is used for a different purpose than the
> object oriented programming. I don't think that is the answer they
> are looking for.

They're mutually exclusive -- object-orientation is a programming
paradigm used with languages like C++, Python, SmallTalk, etc. An API
is just a programming interface. Asking if APIs are better than
object-oriented programming is like asking if a wrench is better than
a screwdriver. They can be used together and both are useful for
solving certain problems, but one isn't "better" than the other.

> Am I close?

I'd do some more research on both topics if I were you.

-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
 If I were to divulge it, it would overturn the world."
 -- Jelaleddin Rumi

Reply via email to