2009年3月12日星期四

Component API Design Evaluation

five major issues, difficulties, and challenges in component API design
Major Issues:

 Define useful API’s characteristics: To define the key factors making API more helpful for coders .
 Define usable API’s characteristics: To define the key factors making the API document better on easiness, Learnability and rememberability.
 Making useful APIs: Follow the defined characteristics and make the APIs useful.
 Making usable APIs: Follow the defined characteristics and make the APIs usable.
 The factors affecting usable useful API: Check the defects of early design and optimize the document.


Difficulties:

When an API has such following troubles, the users will have difficulties to use this API:

 Bad Learnability: Loose organization, bad logic, and other things to make API difficult to learn.
 Bad Rememberability: A huge set of concepts or function lists will have the coders to search in the API document time by time.
 Hard to write client codes
 Hard to interpret client codes:
 Frequent misuse: Bad naming and misunderstanding description may cause the coders to select the wrong function and get in troubles.

five major causes which lead to poor component API usability

 Complex! : The number of functions exceed the need of users, and leads to the unnecessary complexity.
 Too simple! : Only a few words for a very complex function will not help the coders at all.
 Bad naming! : call1(), call2(), call3() are much more confused than callclient(), calladmin()…
 Ignorance of caller’s perspective! : APIs should be designed from the perspective of the caller , otherwise it may loose usability.
 Concept incorrectness! : If the definition itself is not correct, how can coders get correct function in this document?


five component API design tips to increase component API usability )


 Easy to learn.
 Easy to remember.
 Easy write client code.
 Easy to interpret client code.
 Difficult to misuse.

没有评论: