Wednesday, November 22, 2006

API Design

"API Design" is a more important skill in OOP design than modularity. The software engineering crisis of the 1970's witnessed the exponential growth in man months as number of lines of code grew linearly. The number of interactions between code segments increased omplexity- the n-squared problem. Modularity solved this problem. Why then is "API Design" more important?

As a developer, you have the power to "expose" the functionality you like through a clean interface; you have the power to hide the details in the implementation.
Receiver Relevant implies the object contains the data and its associated operations close by.

Think like a client when writing your implementation. For example, in a binary tree interface, your client probably doesn't want t.getLeft(), but rather he wants t.lookup().

Chad Salinas