You could translate うちに to "before", but more accurately it'd be closer to "while" or "during" as in "during a period when a certain situation remains in effect"

雨が降らないうちに帰りましょう。= While it is not raining, let's head home!

前に on the other hand has a clearer distinction of what happens before.
私は東京へ行く前に日本語を勉強しました。= Before went to Tokyo, I studied Japanese.


The use of ながら expresses actions that happen simultaneously.
私は踊りながら音楽を聞きます。= Every time I listen to music, I dance.
Here with using ながら the later listed action (listening music) is the focus. When using あいだに, both actions are of equal importance.