Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: APIs that nail it
4 points by jwilliams on Nov 30, 2008 | hide | past | favorite | 3 comments
As part of a piece of personal research I was looking into various APIs.

I wanted to spend some time digging deeper into what was behind good APIs - then I was a bit stuck. I honestly couldn't think of an API that really stood out as extraordinary...

I quite like LLVM and some of the Apple APIs perhaps. Others suggested jQuery and QT.

Does anybody out there have examples of an API that they love to use? That absolutely nail a particular domain?



Both Perl and Python have web libraries that have always seemed close to perfect to me.

As an example, a few days ago a friend of mine was trying to figure out how to tell people within her organization how to find the "canonical" URL from a request (the URL that the browser ended up at after possibly numerous 30x redirects) without having to actually go there with a browser, and after I'd suggested wget...she came back with, "Can it be done in Python? Everybody already has that installed." In about 90 seconds, I was able to whip up a couple of lines that did the job, and an example of doing it from the Python REPL. So, urllib2 is surprisingly powerful and clean.

Perl has LWP::Simple, which is similarly awesome.

Google Checkout, IMHO, is a great example of what not to do, while PayPal manages to provide similar services in a much more coherent fashion. (I think it's particularly sad that Google had the opportunity to learn from people who'd come before...and they still managed to make a worse API.)


QT is indeed really good. They also wrote an article about how to design APIs:

Designing Qt-Style C++ APIs

http://doc.trolltech.com/qq/qq13-apis.html


Hpricot




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: