473,326 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

What is an API?

103 100+
Appologies if PHP is the wrong place for this. There is no API section and I only really know PHP.

I have built my own shopping cart for my website using PHP 4.3. I am looking at payment processing and I will probably use Paypal Website Payments Pro (UK Version).

My Questions... (sorry if they have obvious answers!)
- what is an API?
- if I know PHP and XHTML pretty well do I need any other programming skills?
- is an API something you download and install or just a syntax (like HTML?)

Thanks in advance!
Jun 27 '07 #1
3 1237
Atli
5,058 Expert 4TB
API is short for Application Programming Interface (Click for wikipedia link)

PHP is an API used for server-side web programming, as are ASP and JSP.
Direct3D and OpenGL are graphics API's and the functions used by windows programmers to create windows and controls is called WinAPI.

It is not really a program or some programming tool, it is the programming language itself.
Jun 27 '07 #2
henryrhenryr
103 100+
Ahh.. Thanks! That makes it clear. And so really, in order to programme using an API, I only really need to know the syntax and I can at least give it a go?
Jun 27 '07 #3
It is not really a program or some programming tool, it is the programming language itself.
Sorry about that, but this is not correct. :P

An API is not a programming language, but (like the name says) an interface. Interfaces and programming languages are two different things:

A programming language is a way to represent algorithms, logic and commands in a human-readable form. Some would even say, PHP is not a programming, but a script language, since it is interpreted, while source code written in "real" programming languages as C or C++ is first compiled, linked (which results in an .exe file) and THEN executed. I have written programs myself in C++ for several years now, and PHP and C/C++ are very similar in their syntax, although C/C++ syntax is MUCH more strict. In C/C++, for example, you have to define the exact data type a variable has--not like in PHP where this can change all the time.

An API, however, is an interface that is developed for a programming language, so that source code written in that language can use the API to do certain tasks (like rendering graphics when it comes to DirectX or displaying windows or writing/reading files when it comes to the WindowsAPI).

So, an API is not the programming language itself, but the interface which can be used by source code to access certain functions. This may sound like it's the same (and in PHP you sometimes think it is), but it's actually not.

In C/C++ you may perfectly well code a program which does not use any API and just does some math or reorganizes the RAM, although this is pretty useless since when you don't use an API, there is no way to interact with the outside world, like actually printing out your results or taking in user information.

Hope this somehow helps?

:)
Jun 27 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: thecrow | last post by:
Alright, what the hell is going on here? In the following code, I expect the printed result to be: DEBUG: frank's last name is burns. Instead, what I get is: DEBUG: frank's last name is...
220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
92
by: Reed L. O'Brien | last post by:
I see rotor was removed for 2.4 and the docs say use an AES module provided separately... Is there a standard module that works alike or an AES module that works alike but with better encryption?...
137
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very...
12
by: Dario | last post by:
The following simple program behaves differently in Windows and Linux . #include <stdexcept> #include <iostream> #include <string> using namespace std; class LogicError : public logic_error {...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
47
by: Neal | last post by:
Patrick Griffiths weighs in on the CSS vs table layout debate in his blog entry "Tables my ass" - http://www.htmldog.com/ptg/archives/000049.php . A quite good article.
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
8
by: Midnight Java Junkie | last post by:
Dear Colleagues: I feel that the dumbest questions are those that are never asked. I have been given the opportunity to get into .NET. Our organization has a subscription with Microsoft that...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.