'. '

Usecase

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(New page: High level description of an actual problem a user (of an API) may face. For example: ''I want to alphabetically sort names of some persons'' Such usecase is then states that th...)
Current revision (15:13, 30 December 2015) (edit) (undo)
 
Line 16: Line 16:
</source>
</source>
-
[[Usecase]] are an important entry point when describing and documenting [[API]] [[DocumentDeclarativeAPI|abstractions]].
+
[[Usecase]] are an important entry point when describing and documenting [[API]] [[DocumentDeclarativeAPI|abstractions]]. Always put [[usecase]]s into overview section of [[Javadoc]] of your [[API]].

Current revision

High level description of an actual problem a user (of an API) may face. For example:

I want to alphabetically sort names of some persons

Such usecase is then states that this is a problem that this API is ready to solve and is then followed by a scenario how to solve the given problem. For example:

Create a List of Strings. Put there the names. Use sort method.

Which is then reflected by the actual realization. In Java:

List<String> arr = new ArrayList<String>();
arr.add("Tom");
arr.add("Petr");
Collections.sort(arr);

Usecase are an important entry point when describing and documenting API abstractions. Always put usecases into overview section of Javadoc of your API.

Personal tools
buy