I am designing a class library to represent western equal temperament music theory concepts for the purpose of composing notated music with code (I realize there are other libraries and programs for this but I want to design my own). The problem I am having is that when I start with the most fundamental concept (PitchClass) and start building upwards, I very quickly spiral out of control with too much complexity in the design. I end up scrapping it and starting over.
I am thinking about a new approach. Start by writing a program (which will not compile) that demonstrates how I want to use the library in the end. For example write the sample programs that might accompany a library first, as a part of the design process. I am hoping that doing so might help me with lower-level design decisions so that I do not lose myself in design complexity.
This approach is analogous to test driven design, but different in that the sample program is not isolated to a single class or function, but instead demonstrates the interface of many high-level classes.
Is the top-down design methodology I am describing here a valid approach? Does it have a name? I am working alone, but do teams ever use an approach like this?
This does not answer the question because it is specifically about designing a web UI and dealing with browser differences.
This is not relevant because it is about back-end vs front-end specifications.
This is not a duplicate because it is specifically about approaching an MVC stack.