tags:

views:

2593

answers:

33

Just curious, what's the best API that anyones ever used & what was the development process that led to that API being so good? (Or was it something else) Open source, proprietary, whatever code you've come into contact with.

+4  A: 

I haven't used that many different APIs, but I find that both the .Net and Java API are pretty remarkable. Compared to the APIs available in C, C++, and PHP, they are pretty remarkable.

Kibbee
Java Collections is pretty good. Not perfect, but good!
broady
+11  A: 

The best API I've used so far is the TurboVision textmode gui/application framework library that came with Turbo Pascal.

It was very simple to use, could do things out of the box that the win32 api still cannot do (like doing automatic resizable dialogs). It was almost bug-free, performend very well even on slow machines, and from a software design point of view it was simply a masterpiece.

Nils Pipenbrinck
+1 really liked it. Though in retrospect it was more the jump with what there was before.
Marco van de Voort
Yep. I think that was it.. After all the years a I came across a well designed gui interface..
Nils Pipenbrinck
I wholly agree with @Marco van de Voort, Turbo Vision was awesome at the time compared to everything else. In retrospective though, it had its design faults, e.g. the necessity of writing one gigantic event handler for all possible events, or when you had to fiddle around with weird relative color palette indices when you wanted to adjust some UI element class' colors.
stakx
A: 

Sharepoint has a pretty nice API. I haven't used it in production code, but I have played around with it.

There are some frameworks that I don't really like that also have pretty sweet API's. SQL Server Reporting services is one of them. I never really like getting into SSRS, but if you have a report that you want to run and export to pdf or excel in a batch format, the API is a life saver. MS CRM also has a pretty good API.

Charles Graham
+1  A: 

Although complex and sometimes confusing, the Eclipse Rich Client Platform with SWT has been fantastic for generating applications.

scubabbl
+21  A: 

I don't know if you accept jQuery as a framework, but anyway: it's amazing (at least if you have fighted with JavaScript without jQuery earlier)

Espenhh
The problem I have with jQuery is actually that it's not really an API anymore, it's basically a language in it's own right.
annakata
+2  A: 

The Perl DBI.

Same API across different databases (which was a big thing when it came out), proper support for the all-important bind variables, and so much more powerful/less verbose than for example JDBC. Just compare the number of steps you need with pure JDBC (without Jakarta Commons DbUtils) to do a selectall_arrayref.

Thilo
+8  A: 

The Spring Framework boasts an exceptionally easy to use API, with excellent documentation to get you started, if you can be bothered to RTFM, of course ;)

MetroidFan2002
+1 for The expression language component within same
Ruben Bartelink
Downvoter - care to comment?
MetroidFan2002
A: 

I really liked the SQL-DMO library the first time I used it (SQL 2000), and ended up writing several utilities around it. The nice thing was it exposed nearly every aspect of a SQL server to your code, making it possible to write an app that could do lots of the fancy things that Enterprise Manager could do, but in a way that was easy for non-technical users.

Chris Tybur
+4  A: 

It depends on the language, as for me, for C++, Qt is a good API. They have pretty much most of the common used APIs (network, file, DB, string, etc). As for the licensing, it is free for Open Source projects, but for commercial projects, you need to buy the license (it is per developer, don't know of site licenses). They also have support for Java, but I haven't used that yet. And also API for embedded devices (smart phones, etc). Nokia just bought Qt's company Trolltech, but they still committed to cater for their existing QT API users.

note: Qt is now licensed under the LGPL, meaning it's free for commercial use.

Akabane
Qt is now LGPL meaning you don't need to buy a license for developing commercial products. Please correct the misinformation ;) http://www.qtsoftware.com/about/news/lgpl-license-option-added-to-qt
took the liberty to edit your post.
+2  A: 

The Java API. I like it very much, even when I don't like the language too much.

Gastoni
The Java API is horrible, just look at java.util.date and tell me that people were not smoking weed when they wrote it.
FlySwat
which Java API. Theres more than one thing in there...
mP
Java.Util.Date might be poorly written, but that doesn't mean that the API is bad. I should have specified that I like the WAY it works. It is pretty easy to use and understand, I like the HTML pages full of links. I always know where to go or from where I came. All the APIs look the same, HTML.
Gastoni
The Java API was created before many of the current OO "best design practices" were known. In fact, the "Gang of Four" and many other major OO design practices were written _for_ Java.
Robert Fraser
+1  A: 

Eclipse RCP has a very well thought out API. It's well documented and intuitive.

Wesley Tarle
+10  A: 

WPF, hands down. It's thought out, elegant, and the power that comes from Dependency Properties, Routed Commands, and the Style/templating framework is genius.

Paul Betts
Although, when things go wrong, debugging is a nightmare. Some of the binding syntax is a little obscure too.
stusmith
@stusmith Do you know about the data binding tracing that you can enable in App.config? Makes tracking down what's going wrong much easier
Paul Betts
+25  A: 

The .Net API, all the way.

iansinke
+1. Incredibly well thought out and very well laid out.
FlySwat
+1, is there any other? :)
-1. This answer doesn't address "why". IMO, the .NET API is awful -- there is so much -------- state!!! Immutable objects + free/static functions reduce state, which in turn reduces coupling between your code modules AND removes threading issues. But this is certainly a matter of opinion. IMO, the Haskell standard library is the "perfect" standard lib.
Robert Fraser
+2  A: 

Smalltalk-80.

+11  A: 

Qt - undoubtedly. Because of its extensiveness, but mainly its depth and the amount of good thought and design practice they placed into it.

After a very short time with Qt you reach a stage it takes you only a few seconds to find the classes/methods you need, because everything is organized in a very intuitive manner. Memory management is handled beautifully, and you hardly need to worry for dynamic (dis)allocation for GUI classes. The MOC-based signals and slots mechanism is one of the best I've seen for decoupled message passing. It continues to amaze me that something as flexible can be done in C++ (with very little help from MOC).

Eli Bendersky
I totally agree with you.
Sharique
+12  A: 

Boost has been my best experience as a developer. I think this qualifies as an API.

cdv
-1, While I love the functionality of boost, its programming interface is rather complicated imho.
milan1612
Yes. Just like the rest of C++, particularly when it comes to meta-programming. But as Bjarne as put it, you don't want to be as "smart" as the boost guys.
cdv
+1  A: 

I think the most comfortable API for developer is Cocoa - rich abilities, easy to use, good documentation bindings for many programming languages.

You're joking, right? Cocoa doesn't even have a NSLinkedList.
broady
A: 

Java API (including Swing/AWT :o) Just getting to grips with C# (.NET API) and everything seems in order there.

Oh, and any API that I've created! :p

Richie_W
+1  A: 

I've always been impressed with the .Net and Java class libraries. Great naming, well-organized, and object-oriented. I'm also becoming impressed with Apple's frameworks in Objective C.

In contrast, the worst I've ever worked with are Boost and the C++ STL. Cryptic or non-intuitive naming, huge learning curves, and confusing error messages.

+2  A: 

The XNA framework has struck me as quite well laid out, actively supported (for the moment) and reasonably documented. It's put down enough rails to ease the uninitiated into game development, providing multiple platform/Live support as well no less. The targeted sample kits are also a huge bonus to the documentation.

bkane
Would +1 but none left for today :(
RCIX
+4  A: 
  • The Microsoft .NET Framework Base Class Libraries
  • jQuery
  • LINQ (both API and language extensions)
  • Currently digging around in Expression Studio AddIn model. Very clean, can get stuff done with no documentation available.
Jonas Follesø
You might want to look at the Java libraries, which are often much more complete.
mP
+4  A: 

Flickr and Twitter. Flickr is still my gold reference for web apis. Twitter I didn't grow to appreciate until I saw Mike Verdon's Python Twitter Tools and just how few lines of code it took to use the API.

Parand
A: 

I love the Windows API I've worked with so far, which is entirely pre-Vista. It is extremely customizable and well designed. Very efficient and it allows you to override almost anything. Most of all I found it very unambiguous.

Having said that, I don't think I'd be interested in looking at the new API changes or additions in Vista.

Vulcan Eager
+10  A: 

The award winning Java Collections API.

http://java.sun.com/j2se/1.4.2/docs/guide/collections/

artknish
Yup. Coming to .NET from Java, I've come to appreciate the Java collections for their consistency. In Java: Map (interface), HashMap, TreeMap. In .NET: IDictionary, Dictionary, ListDictionary, HybridDictionary, StringDictionary, OrderedDictionary, DictionaryBase, Hashtable, and SortedList (which - despite its name - is actually .NET version of TreeMap)
Robert Fraser
+2  A: 

The gtk+ api... I was pretty pissed of at not having syntax for oop when using it from C, however vala really makes you see how fun and simple it actually is as an api.

Phrodo_00
+1  A: 

Emacs Lisp and its libraries together make up the best "API" I have ever used, hands down. It allowed people to do things the original creators of Emacs, or really any developer of a text editor, had ever dreamed of.

Emacs Lisp had aspect-oriented programming long before most people had ever heard of AOP. It was a dynamic language before anybody who spoke English knew about Ruby. It had garbage collection when most people were still cursing over segfaults.

And yet, with all that power to create web browsers and symbolic math packagaes and IDEs, it was still extremely useful and powerful for extending the text editor to actually edit text in more efficient ways for its individual users. No two people use the same Emacs because of it.

Robert Sanders
+1  A: 

After using SDL, PyGame was a breath of fresh air.

Josh Segall
+5  A: 

OpenGL, just for making it so simple to get into 3D programming with such a small learning curve (at first at least)

JonoW
+2  A: 

Shoes for Ruby. In my experience it's the very quickest, simplest API for throwing together a simple application, nifty game, handy tool, etc. with a quick and dirty GUI. If you're writing code for yourself, look no further.

See some examples.

Kevin Conner
A: 

first you should define what makes an API great.

For me, it's the documentation, which determines how easy the API is to use, and what's the learning curve. There's nothing I fear more than Trying out a new API when I'm on a deadline.

That said, I don't know if it counts as an API exactly, but the documentation for Wordpress developers (for creating plugins as well as themes) is probably the best around, very tidy, very clear, and lots of relevant examples.

The Twitter API, on the other hand, has a horrible documentation in my opinion. very messy and incomplete.

Adam
A: 

Call me old fashion but I have always liked the Win16/Win32 API's. They where both very similar to the OS/2 API which I thought was very close to perfection.

The OS/2 GDI layer was crap (or too demanding for the hardware of the time) but other than that it was a great API.

Blake7
A: 

malloc and free.

Greget
A: 

Tango command-line argument parsing. Just read the first couple sentences of http://www.dsource.org/projects/tango/docs/stable/tango.text.Arguments.html and you'll see what I mean :-). Everything about it, from the documentation to the available methods, to the pre/post condition setting, to... it's perfect.

Robert Fraser