Monday, March 29, 2010

Learning Ramp for the Twitter API:Terminology

Part the the learning ramp for the twitter API is to make sure I understand all the terminology, and know how it works. Dealing with the twitter API there are a lot of terms that might be unknown to many first time developers, and it is important that everyone know the lingo. In this entry I will go through all the terms I am unfamiliar with and define/explain how they pertain to the twitter API in my own words.


  • API (Application Programming Interface) - To be clear here we are dealing with web API's and they work basically by allowing an interface for the software of two web programs to interact with each other on the back end, and make requests. An analogy could be that you are needing a ride from your Mom to you friend's house because you do not know how to drive, and you have to communicate that to her so she will be to give you a ride to your friend's house. Much like how the the Twitter API works if you have an app that finds only tweets about healthy eating tips you have to allow your app to interact with the Twitter API and ask it to give you only those tweets about healthy eating. 
  • REST (Representational State Transfer) - Is a software architecture that is used for the World Wide Web. REST works by a client requesting some form of information from a server, and that server returning the appropriate response. REST uses sources of specific information, which it calls resources. To alter the resource, servers communicate through a HTTP proxy and exchange representations of the resource. So in non-technical terms for example, I am the client and I want to eat an egg which is the resource, but I the egg (resource) can be represented in many ways such as scrambled,sunny side up, boiled or omelet style from the pan (server).
  • SOAP (Simple Object Access Protocol) - Is a specific protocol for the exchange of structured information in implementation of Web services, so it basically takes a message or API, converts it into machine readable XML format, and thus making that message easier for third party sites to use. 
  • XML ( eXtensible Markup Language) - Is a type of markup language, which converts documents into machine readable format. Basically if you typing some thing in English and sending it to someone who can only read and write in Chinese, by the time you send it the English text is converted into Chinese so the Chinese person can easily decipher the message. XML works in that same way it changes any message you send to your program to machine language so your computer can understand that message as well.
  • JSON (JavaScript Object Notation) -Is an alternative to XML, but works in the same way. It works by serializing and transmitting structured data between a server and a web application. The difference is that JSON is in human readable format, and it is only used for data exchange. It is primarily used in data exchange over the internet. JSON is also much less complex and smaller in size than XML thus making it lightweight, but both struggle with mechanisms for representing large binary data types like image data.
So what I learned from all of these terms is that REST is much more flexible in data exchange then SOAP, which is why I assume that twitter's API is RESTful. Also I learned that JSON is the preferred way to exchange data over the internet, because it is simpler and more lightweight then converting the data to XML. It makes sense why people don't like using SOAP! 

No comments:

Post a Comment