In an ideal world :)
In the real world the customer doesn't know what they want and you can't fully guess what they want or need ahead of time no matter how many diagrams you draw.
Incidentally, one of the few good things that came out of the "agile" religion.
And the exact point I tried to communicate.
When you decide to have loose architectural structures, you might allow just writing these types of functions adhoc.
The further you go in the project, the more your strengthen the architecture, where needed.
In an ideal world :)
In the real world the customer doesn't know what they want and you can't fully guess what they want or need ahead of time no matter how many diagrams you draw.
Incidentally, one of the few good things that came out of the "agile" religion.