The problem is that there is now another variable you would need to keep track of: your UML diagrams / documents.
I guess creativity comes into play. For example if I am designing a video editing API. I could think bottom up and start from frames/buffers maybe. I might reason that I require a:
- Renderer - Singleton that is an editor which holds our sequences - Interfaces that can be exchanged for different types of editors - etc.
However the other approach is top down. Imagine how the ideal api looks like and go from there:
editor.addSequence(sequence) editor.process(item: [ .transaction(action: editAction), .transaction(action: saveAction), .transaction(action: finishAction) ]
^ so for example I might start from there and build the system from that point of view.
Anyways would appreciate more of a discussion here.