On the ground of specification first we start from UX and graphics design.
Taking into account all functional demanding of a software we draw a necessary schemas, flows and actions. With all this mass on one board we can see the final size of a project, and split it into modules. But messy board, even divided into modules will not be comfortable for final users if we use this model directly. So the second step is usability optimization.
Blocks and diagrams must meet with drafts on user screen. Everything is physical again. Dimensions of devices determines shape of user interface, which is the ground for visual design.