Exclusively for you!! Trial version of Google Apps, Apply Coupon-CNHPGX6T6QRWGV!!

What is an API and What good is it?

Handshake
Handshake @Image courtesy of pat138241/ FreeDigitalPhotos.net

What is an API and What good is it?

Welcome to CodeSpread!

Did you anytime hear these questions?

What is an API?

Why it is required?

How to make it?

People have googled, few were satisfied and others came out perplexed. So why not we also try!

We searched for the same on Google again and enlisted some definitions from top 10 results available across the web. We will also add our own spices to explore more.

Wikipedia says “An application programming interface (API) specifies how some software components should interact with each other.”

Howstuffworks.com says “An application-programming interface (API) is a set of programming instructions and standards for accessing a Web-based software application.”

One answer from stackoverflow.com, “An application programming interface (API) is a particular set of rules (‘code’) and specifications that software programs can follow to communicate with each other. It serves as an interface between different software programs and facilitates their interaction, similar to the way the user interface facilitates interaction between humans and computers.”

Let’s see one real-world example so that a layman can easily understand the concept of API.

 

Think of two conditions, one when there is no remote control available to change the settings of TV and other is when the remote control is available.

Obviously remote control condition is much favored as only few clicks are required for any setting change. Here, remote control acts as an API where the settings of TV can be changed without directly interacting with TV knobs. While sitting on a sofa few feet away from TV, you can control your TV. Life is easy!!

Few lines for our tech persons also.

API

API

 

We have two applications having their own independent implementations. Now if they need to access information from each other or one way flow then they need to expose their logic but hide the implementations, so for that, they need to create API for their application. An API is nothing but an interface which has only definitions but no implementation logic exposed. Each programming language has their own syntax to do it but the idea remains the same.

What good is API?

Answer is simple use. Also, one question, did we talk anywhere about creating a proxy? J

Where we are using API?

Yo may recall, we are using Google analytics to know the daily visits, facebook API to know the number of likes, twitter API to know the tweets, and so on.

Any more questions?

Author: hershey

A passion for knowledge drives me to do programming, A passion for programming drives me to create something different, A passion for creation drives me to spread the knowledge.

Share This Post On

2 Comments

  1. nice superb explaination

    Post a Reply
  2. thanks for the tutorial
    I am having a problem.
    The feature “Create SQL server database” isn’t available , I can’t select it.
    Can you help, please ?

    Post a Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

More from CodeSpread:

  • Interview : a question mark?Interview : a question mark?I like going for interviews for two simple reasons: I found that this is the simplest way to remain updated with the latest knowledge. If we look at the IT trend, daily new software are gett...
  • Why Multiple Inheritance is discouraged?Why Multiple Inheritance is discouraged?Hi Guys, This is Sathish Again,Today we will discuss why most of the higher languages eliminates Multiple Inheritance? Most of you guys already know that multiple inheritance is not available for...
  • Asp.Net: Hidden Truth of CookiesAsp.Net: Hidden Truth of CookiesI know there are several articles on cookies as what are they? and how can they be created? but i always wanted to know more about them. My questions were where they are stored? how to track their ...
  • 16/12/2013: 10 Best Practices of programming from CodeSpread16/12/2013: 10 Best Practices of programming from CodeSpreadWe love programming and having a knowledge of best practices always helps in writing beautiful code. Here, we have few best practices shared by professionals. Best Practice#1, Use foreach loop i...
  • Concepts: S O L I DConcepts: S O L I DSOLID - Object oriented programming principles. May be its easy to forget these principles  but for creating a reusable code or maintainable code, people will always have to come back and check ...
  • 17/12/2013: 10 Best Practices of programming from CodeSpread(11-20)17/12/2013: 10 Best Practices of programming from CodeSpread(11-20)We love programming and having a knowledge of best practices always helps in writing beautiful code. We have shared first 10 random best practice in our previous article here, now we are sharing fe...
  • 18/12/2013: 10 Best Practices of programming from CodeSpread(21-30)18/12/2013: 10 Best Practices of programming from CodeSpread(21-30)We love programming and having a knowledge of best practices always helps in writing beautiful code. We have shared first 20 random best practice in our previous articles 1-10, 11-20. More best pra...
  • Nullable .Net typesNullable .Net typesWe declare .net types in our project daily but still we do not recollect default values for each .net type so we end up doing null check for each data type. Its a basic mistake of a developer but ....