Parking for bicycles

A nightmare for many travellers:
bicycle chaos at the station, no safe place to leave a bike. What can be done to protect bicycles against theft and vandalism?