Tuesday, February 8, 2011

API Design

          We are now diving into the most interesting part of the class- creating the iHale software. To start, we needed to design both the REST and Java API for the software. An Application Programming Interface or API according to wikipedia, "is a particular set of rules and specifications that a software program can follow to access and make use of the services and resources provided by another particular software program that implements that API. 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".
         
          The whole process was a learning experience. I never really like reading APIs specially the really long ones that I usually get lost to. The reason for this could either because I don't like reading at all or the API was poorly designed. If the latter is the reason, maybe because it was really hard to create one. Well, it was hard when starting from scratch specially for me and the rest of the class since we never created one before. What made it even harder is because we are lacking other information. The information on the hardware side (sensors etc.).  Just like the definition said API is an interface for the interaction between programs. It is hard to create an interface if you don't know the capability of the program on the other side (like what data type is used). We assume that all data are represented in XML format, which is in our advantage. We've been working on parsing and creating XML since the beginning of the class.
         
          The most interesting part on creating API for me is just the reason why we are creating API. It is because we're creating a software. I never thought that I would ever come to this point that we are building a software with real purpose.

Here's our sample API.

No comments:

Post a Comment