Wednesday, February 11, 2009

Don’t fear! The APIMan is here!

Naah! Don't worry! You won't see one of those super-hero people here. They are just a figment of imagination. So, the underwears will stay inside for the moment. Getting to the topic, I am really excited about this widget I am making using Flex 3 and AIR. The keyword is "API" here and I am using about 3 or 4 of them...exciting stuff. The project is codenamed as "Flare" and should be live in a couple of weeks, I guess.

I have been fiddling around with APIs only for about a year now. The first API I touched was the Flickr API and I really couldn't get with things the first time. As things took shape, cracking those APIs and extracting application functionality with them became easier. GData API was the next in queue, particularly the Maps API for a geo-coding enabled project. The project didn't take off due to some funding issues and it didn't see the daylight. That project, though, was the one that really got me into AIR. I still reuse code libraries I had developed for that project in various others. It is not the perfect example, but it works that spark in your head.

I have learnt quite a few things about building AIR applications. Here's some:

  1. Make your application "configurable" or "customizable" by the user. This can be from a simple Theme setting to a more complex functionality-based setting.
  2. It is useful to maintain the configuration file as an XML file. It is not only easier for us, as developers, but, its kinda interesting for the user too.
  3. Use the built-in features and APIs rather than trying something totally different and hitting that road block. Like, for example, use SQLLite where needed rather than trying t use SQL Server.
  4. Check your build for bugs and performance issues. Use the "Profiler" built into Flex builder to check for performance issues.
  5. If you are minimizing to the system tray, use a right-click context menu to bring back the application. Commands like "Open" and "Exit" bring out a lot of user-friendliness.
  6. If you are creating a transparent app, make sure it is draggable and has a "mimimize" and "close" button. Once again, it is user-friendly!
  7. Don't just package the app and release it for download as one would do for a simple EXE. Create an install badge.
  8. Make sure you use proper code to look for locally stored files in Application Paths and not hard code it.
  9. You can add auto-update features to make sure your app is up-to-date.

Well, these are just some of them. There are more and a lot of it take their place with practice.

If you haven't tried AIR out, its time to Feel the AIR!

No comments: