A mockup should not be confused with a prototype.
Prototypes are always meant to function, even if not fully so, whereas mock-ups are only meant to look like the real system, and do not function.

We design the user interface before code is written, to avoid having to go back and make expensive changes.