Cadmium is fairly resistant to corrosion, depending on the source, but as a heavy metal it has environmental concerns such as Minamata syndrome. Some alternatives are zinc plating (with similar but lesser such issues), or hardware of brass, stainless steel, and various other alloys.
__________________
In vino veritas; in cervisia carmen; in aqua E. coli.
Zinc plating is a very good option for Cadmium Plating considering the environmental and medical concerns. But Cadmium is still very much popular because it is cheaper than zinc plating and any other options mentioned by Tornado.