8 Replies - 1614 Views - Last Post: 29 June 2013 - 02:24 AM

#1 jojo67  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 18-June 13

Concept of API

Posted 18 June 2013 - 04:40 PM

I am trying to understand the concept of API. From my study it is a set of commands and functions to interact with the operating system. My question is: are Microsoft Office object models APIs at a higher levels?
Is This A Good Question/Topic? 0
  • +

Replies To: Concept of API

#2 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10447
  • View blog
  • Posts: 38,690
  • Joined: 27-December 08

Re: Concept of API

Posted 18 June 2013 - 04:43 PM

This isn't a Java question, so I'm going to move this to Software Development.

Quote

I am trying to understand the concept of API. From my study it is a set of commands and functions to interact with the operating system.

API stands for abstract project interface. It can be a library, a set of tools, or a means to interact with some data. I would personally answer yes to your question based on what little I've read on the Microsoft Object Model. Perhaps someone more familiar with it might disagree.
Was This Post Helpful? 0
  • +
  • -

#3 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,279
  • Joined: 28-March 11

Re: Concept of API

Posted 18 June 2013 - 06:08 PM

Quote

From my study it is a set of commands and functions to interact with the operating system

No, not necessarily the Operating System, it can be any type of software or library. An API (Application Programming Interface) describes how your software is to interact with the OS, a library, other software, etc... An API provides you with a set of "building blocks", you as the developer puts these building blocks together to create your software. An API is a bunch of specifications on routines, protocols, data structures, libraries, object classes, and variables. A good API also contains well written documentation on how to interact with the API. A well known API is the Windows API which consists of many COM objects, functions, structures, dlls/libraries etc... so your software can interact with the OS. You can also think of an API as a software framework.

Any software/library that you interact with publishes an API, for example, cURL has an API, SQLite has an API, POSIX is an API, MS Office has an API so you can interact with it, Google has an API so you can use its different services.

If you create a library/code that others can use, You create your own API so others can interact with that library/code.

When you think of APIs, you need to understand the ABI (Application Binary Interface) which is the low level of the API - Calling Conventions, passed parameters, returned parameters, what registers are saved, what registers are free to use, etc...
Was This Post Helpful? 0
  • +
  • -

#4 jojo67  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 18-June 13

Re: Concept of API

Posted 21 June 2013 - 07:13 PM

I am not trying to be smart, but I can put four functions in a library and call the calls an API?
Was This Post Helpful? 0
  • +
  • -

#5 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10447
  • View blog
  • Posts: 38,690
  • Joined: 27-December 08

Re: Concept of API

Posted 21 June 2013 - 07:41 PM

At that point, it's probably better labeled as a utility class. If you label something as an API, developers are going to expect something of substance. An API provides an interface to a data or system of some sort. The Java Swing API provides an interface to develop GUIs, as an example.
Was This Post Helpful? 0
  • +
  • -

#6 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: Concept of API

Posted 21 June 2013 - 09:13 PM

<API stands for abstract project interface.

I've never seen that one before. Application Programming Interface is the most accepted version. See here for various acronyms.
Was This Post Helpful? 4
  • +
  • -

#7 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10447
  • View blog
  • Posts: 38,690
  • Joined: 27-December 08

Re: Concept of API

Posted 21 June 2013 - 09:15 PM

I stand corrected! I shouldn't have been going off (faulty) memory there! :)
Was This Post Helpful? 0
  • +
  • -

#8 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2533
  • View blog
  • Posts: 4,633
  • Joined: 24-September 10

Re: Concept of API

Posted 23 June 2013 - 04:51 PM

View Postjojo67, on 21 June 2013 - 09:13 PM, said:

I am not trying to be smart, but I can put four functions in a library and call the calls an API?


Technically... sure. But as was said, people will expect more substance.

The API is, well it's in the name... it's the interface. It's the interface of an application to interact with programmatically.

If you're wondering what an interface is, well... you deal with them all the time.

user interface
graphical user interface
tactile interface

It's the facade of something that allows some external operator to manipulate it. So that way the external manipulator doesn't have to dig inside of the device/apparatus/etc to alter it.

I like the "tape player" example. Like... the VCR. The VCR has an interface to interact with it. Buttons to tell it commands: play, pause, stop, eject, ffw, rw, and power. It also has a slot for inserting cassettes formatted for the device (in this case a VHS tape). As well as outputs on the back to send the signal to a TV.

The interface borrowed directly from the cassette tape, and other audio tape players of the past. This way people with experience with the previous devices would understand this new device with little in having to study anything.

This borrowing of interfaces is common. So much so that the DVD player also had a very similar interface. The format of the movie you slid in it was different... but the rest was the same. Same buttons, same outputs, same general shape. They added a couple buttons; track forward, and track back (stuff that was common on CD players already), but they still kept the now useless ffw and rw buttons.

These interfaces protect the internals of the video playback device from you having to muck around inside of it. It also freed it up so that they could change the internals with out you knowing anything about it. You buy a new DVD player 10 years after the original DVD player... and it works the same way. Despite that the technology inside has changed drastically.

Same goes for these APIs. An API designer can define the API in a specific way, and then update the internals with out your needing to care all that much. As long as what occurs when a specific command is made, happens. Windows API is like this... it doesn't change all that much from version of windows to version of windows. If it changes, they add to it to keep backwards functionality. If they have to remove something, they "deprecate" it, letting users know that "hey, we have plans in the future to remove this feature... here is the alternative to it (if one exists), it's remaining in for now to give you the time to update your software in turn".
Was This Post Helpful? 2
  • +
  • -

#9 salazar  Icon User is offline

  • D.I.C Addict

Reputation: 87
  • View blog
  • Posts: 539
  • Joined: 26-June 13

Re: Concept of API

Posted 29 June 2013 - 02:24 AM

An API, or application programing, interface is an interface created by one programmer(s) and used by other programmers. It is sort of an abstraction layer that makes it easier for developers to create apps for a particular domain that would, otherwise, tend to be really difficult and complex. Instead of dealing with all the really low-level work. You just use the API, which usually refers to the premade functions or classes that is provided, to by pass the lengthy process of learning the domain. What I gave is probably a pretty decent non-technical definition of an API. Another way to think of it is a "wrapper" for more complex code so that you can develop easier. Could you imagine doing windows programming without API provided by Windows?

This post has been edited by salazar: 29 June 2013 - 02:28 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1