May 31, 2006

Do You Know What Are "APIs"?

**Excerpt of IM conversation**

Developer: Hey! I need some help!
Me: Wassup?
Developer: You know anything about "Invalid SOAP Envelope" error?
Me: Hmmm... Not very sure, but it looks like the SOAP message you generated could have an issue.
Developer: ...
Me: Print out the SOAP message you're sending over.
Developer: How?
Me: You're using JAX-RPC, rite? Check the API to see how you can print out the SOAP message..
Developer: API? Huh? I dunno how-le...


Well... I hoped that the developer didn't mistake API for "fire". ^_^

In Malay, API translates to fire. However, for us in the IT world, API is something very common that we come across with everyday at work.

If you must know... API = Application Programming Interface...

In the days of old, APIs were commonly known as libraries (esp if you were a C/C++ programmer) and during those days, some were "free" or proprietary. (Opensource back then was a "hippy" concept.. Kekeke) Anyway, if you were a C/C++ programmer, you would have been very familiar with the header files that someone would send over and from that file (plus documents), you would have an API to work on for your application.

Anyway, for Java, we benefit a lot more because we can have HTML-based documentation for the methods and classes that we built. This is the infamous Javadocs. It's nifty that to build the JavaDocs for your application, you don't need additional tools as it comes FOC with your standard JSDK. So, this means, once you're done with your development, you've compiled your code into little neat JARs (Java ARchives), you can run javadoc from command-line or IDE to generate your HTML-based documentation!

Neato, huh! ^____^

That's a little bit of history for ya.. So, this means for Java, the API would encompass not only the JARs that you get, but the JavaDocs as well. It sure beats writing a lot of documentation to document the methods!

Now that you know what are APIs, do you know how to use them? -____-|||

A lot of developers I know don't even know how to use the standard JavaDocs from Sun. It's sad... In fact, some don't even know that they even exist!! Perhaps they are the "CnP" (Cut n Paste) developers, who copy other people's code and just use it as they feel that they are not experienced enough. However, something as easy as finding out what methods a class has shouldn't be too hard, right?

Anyway, here are a list of very useful JavaDocs that you may want to keep bookmarked on your browser. If you're a bit kiasu, you can download the JavaDocs and create a bookmark to view it locally.
For the J2EE folks out there, the following is very useful:
Hope this helps someone out... Kekeke.. ^____^

No comments:

Post a Comment

Please feel free to add your comments. However, take note that your comments may be edited or deleted as seen fit by the author of this blog.

Take note that the author of this blog may not be held responsible for the comments which may be insensitive, vulgar or controversial.

Related Posts with Thumbnails