Alex Rivera | Logout

When is an API overengineered?

Asked 2009-06-04T02:45:58.777
11

I despise working with overengineered APIs that don't make simple things simple. Nonetheless, I'm working on designing an API for an open-source library and I'm starting to feel that I'm falling into the overengineering trap. I really can't tell for sure because, of course, I wrote the darn thing, so how it works is more obvious to me than anyone else. What are some warning signs from a developer's perspective that your API might be overengineered?

Edit
Report

2 Answers

1

Start to worry when you have a large API with a lot of functions which, on closer inspection, turn out to be compositions of simpler operations. An API with a high ratio of composition mechanisms to primitives is usually a good design.

(API design is very similar to language design, and here I am essentially espousing the Scheme philosophy—instead of piling more routines into the API, simplify it and include composition mechanisms that render the additional routines unnecessary.)

answered 2009-06-04T03:49:14.610
0

When using the API is: (1) more obtuse, more complex, less efficient, and less predictable than just using the underlying technology, AND (2) does not offer a significant advantage for safety, scalability, or cross-platform freedom.

answered 2009-06-05T14:33:28.067

Your Answer